Commit 4d000a6e authored by Rohit Gupta's avatar Rohit Gupta
Browse files

update for sudo check

parent 25b3eeb4
......@@ -398,10 +398,12 @@ else
fi
tmpfile=`mktemp`
echo \'$passwd\' | sudo -S -v >& $tmpfile
echo \'$passwd\' | sudo echo $HOME >& $tmpfile
tstsudo=`cat $tmpfile`
if [ "$tstsudo" != "" ]; then
if [ "$tstsudo" != "$HOME" ]; then
echo "User might not have sudo privileges. Exiting"
echo "tstsudo = $tstsudo"
exit
fi
echo "tstsudo = $tstsudo"
rm -fr $tmpfile
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment