From 855fddda18e705c62a90cc86a6d89e45bb804a27 Mon Sep 17 00:00:00 2001 From: agardner Date: Fri, 8 Sep 2017 16:22:08 -0400 Subject: Fix for when requiretty is disabled with a ! you can disable requiretty by !requiretty or #requiretty so catch both of those cases Change-Id: Ic7fb1cf97849258b1e4db34be82794918bf722e0 Signed-off-by: agardner --- utils/jenkins-jnlp-connect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index c46ca89f5..13cb025d6 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -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 -- cgit 1.2.3-korg