Skip to content
Snippets Groups Projects
Commit 4d000a6e authored by Rohit Gupta's avatar Rohit Gupta
Browse files

update for sudo check

parent 25b3eeb4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment