Merge "Fix for when requiretty is disabled with a !"
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 11 Sep 2017 20:18:30 +0000 (20:18 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Mon, 11 Sep 2017 20:18:30 +0000 (20:18 +0000)
utils/jenkins-jnlp-connect.sh

index c46ca89..13cb025 100755 (executable)
@@ -52,7 +52,7 @@ main () {
     fi
 
     if [[ $(whoami) != "root" ]]; then
-      if sudo -l | grep "requiretty"; then
+      if sudo -l | grep "requiretty  | grep -v "\!requiretty"; then
         echo "please comment out Defaults requiretty from /etc/sudoers"
         exit 1
       fi