X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-lock;h=a46d681aec9b6c0a115f7265547754f3a22e7163;hb=c4004ce5be013ef7ab40d1c82212043236a10d6a;hp=6b0bf598cd085033a63e72bac313d7b4885c062d;hpb=db8bf7a6603507d5b9664d1c631c89a828279748;p=grml-scripts.git diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 6b0bf59..a46d681 100755 --- a/usr_bin/grml-lock +++ b/usr_bin/grml-lock @@ -4,17 +4,16 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Jun 04 22:49:37 CEST 2007 [mika] ################################################################################ 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