From 4d000a6e8e79cd28a29b2abafe74f12830027193 Mon Sep 17 00:00:00 2001 From: Rohit Gupta <rohit.gupta@eurecom.fr> Date: Tue, 1 Dec 2015 19:53:15 +0100 Subject: [PATCH] update for sudo check --- cmake_targets/autotests/run_exec_autotests.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index 7955defa63..40160d73ac 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -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 -- GitLab