summaryrefslogtreecommitdiffstats
path: root/utils/jenkins-jnlp-connect.sh
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-08-14 23:26:57 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-14 23:26:57 +0000
commit341749a5b6dadf4839ae289dd2441dba5a81336b (patch)
tree52d2a05783194e9dacef19702faec2f318861bbb /utils/jenkins-jnlp-connect.sh
parentcaf494c7908e3fbade69136e4e6fe6210afb73d0 (diff)
parent8958c08a0309b22a58d7559217516f13a26e2036 (diff)
Merge "fix requiretty check, use 'sudo -l'"
Diffstat (limited to 'utils/jenkins-jnlp-connect.sh')
-rwxr-xr-xutils/jenkins-jnlp-connect.sh4
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