X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-lock;h=0e04959589bd33b9fd69fefb36f4293f4d3e046f;hb=1f0b02fbbe5adaea1054672d7cf9d6a37ff9178e;hp=9d63aaacc9ad6a71295a20164a87160921ac5011;hpb=594106bdaed1436c748160234766e0fbb5f697db;p=grml-scripts.git diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 9d63aaa..0e04959 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: Son Mai 06 15:52:16 CEST 2007 [mika] ################################################################################ -PN=$0 +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 } + check4progs vlock xlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } else - check4progs sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } + check4progs vlock sudo chpasswd dialog || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 } fi fi @@ -100,14 +99,18 @@ case $retval in esac } -if [[ $(tty) == /dev/tty* ]] ; then - welcome_screen - askpwd - askvlock -elif [ -n "$DISPLAY" ] ; then - welcome_screen - askpwd - askxlock +if ! isgrmlcd ; then + [[ $(tty) == /dev/tty* ]] && lockcons || lockx +else + if [[ $(tty) == /dev/tty* ]] ; then + welcome_screen + askpwd + askvlock + elif [ -n "$DISPLAY" ] ; then + welcome_screen + askpwd + askxlock + fi fi ## END OF FILE #################################################################