From: Ulrich Dangel Date: Fri, 6 Nov 2009 18:19:28 +0000 (+0100) Subject: Require xlock in grml-lock if DISPLAY is set. [Closes: issue768] X-Git-Tag: v1.2.1~2 X-Git-Url: http://git.grml.org/?p=grml-scripts-core.git;a=commitdiff_plain;h=c4004ce5be013ef7ab40d1c82212043236a10d6a Require xlock in grml-lock if DISPLAY is set. [Closes: issue768] --- 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