Skip to content
Snippets Groups Projects
Commit 8f9b55d7 authored by Florian Kaltenberger's avatar Florian Kaltenberger
Browse files

fix for sudo usage in autotests

parent 0b58a7e8
Branches
Tags
No related merge requests found
...@@ -404,14 +404,12 @@ until [ -z "$1" ] ...@@ -404,14 +404,12 @@ until [ -z "$1" ]
esac esac
done done
if [ "$SET_PASSWORD" == "1" ]; then if [ "$SET_PASSWORD" != "1" ]; then
mypassword=$passwd read -s -p "Enter Password: " passwd
else
read -s -p "Enter Password: " mypassword
fi fi
tmpfile=`mktemp` tmpfile=`mktemp`
echo \'$passwd\' | $SUDO echo $HOME >& $tmpfile echo $passwd | $SUDO echo $HOME > $tmpfile
tstsudo=`cat $tmpfile` tstsudo=`cat $tmpfile`
if [ "$tstsudo" != "$HOME" ]; then if [ "$tstsudo" != "$HOME" ]; then
echo "$USER might not have sudo privileges. Exiting" echo "$USER might not have sudo privileges. Exiting"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment