diff options
author | 2016-08-14 23:26:57 +0000 | |
---|---|---|
committer | 2016-08-14 23:26:57 +0000 | |
commit | 341749a5b6dadf4839ae289dd2441dba5a81336b (patch) | |
tree | 52d2a05783194e9dacef19702faec2f318861bbb | |
parent | caf494c7908e3fbade69136e4e6fe6210afb73d0 (diff) | |
parent | 8958c08a0309b22a58d7559217516f13a26e2036 (diff) |
Merge "fix requiretty check, use 'sudo -l'"
-rwxr-xr-x | utils/jenkins-jnlp-connect.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh index d268a28de..8dcaf35c5 100755 --- a/utils/jenkins-jnlp-connect.sh +++ b/utils/jenkins-jnlp-connect.sh @@ -49,8 +49,8 @@ main () { fi if [[ $(whoami) != "root" ]]; then - if grep "^Defaults requiretty" /etc/sudoers - then echo "please comment out Defaults requiretty from /etc/sudoers" + if sudo -l | grep "requiretty"; then + echo "please comment out Defaults requiretty from /etc/sudoers" exit 1 fi fi |