X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-lock;fp=usr_bin%2Fgrml-lock;h=a46d681aec9b6c0a115f7265547754f3a22e7163;hb=c4004ce5be013ef7ab40d1c82212043236a10d6a;hp=0e04959589bd33b9fd69fefb36f4293f4d3e046f;hpb=f7085d516d5dd9ee9b75f78b0012480bdc6a354e;p=grml-scripts.git diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 0e04959..a46d681 100755 --- a/usr_bin/grml-lock +++ b/usr_bin/grml-lock @@ -10,10 +10,10 @@ PN="$0" if [ -r /etc/grml/script-functions ] ; then . /etc/grml/script-functions - if [ -x /usr/bin/X ] ; then - check4progs vlock xlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } - else + if [ -z "$DISPLAY" ] ; then check4progs vlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } + else + check4progs xlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } fi fi