X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fgrml-lock;h=673be73db61b5951c692acf110693eafeb3497a6;hb=36d479340f845cb6ff443b098a1b72782686e26a;hp=0ef9feba7f1ff1bce0025f494c2fcd8d1123d8ae;hpb=6a9a73f08abad4c5baa07cfa00ef22dd0fd5aa98;p=grml-scripts.git diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 0ef9feb..673be73 100755 --- a/usr_bin/grml-lock +++ b/usr_bin/grml-lock @@ -14,7 +14,7 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then echo "${PN}: wrapper script to lock desktop This script is a wrapper to lock your desktop session -through the vlock application. +through the physlock application. Usage: just execute $PN without any further options." exit 0 @@ -22,7 +22,7 @@ fi if [ -r /etc/grml/script-functions ] ; then . /etc/grml/script-functions - check4progs vlock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; } + check4progs physlock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; } fi PWD_TEXT1="Set password (hidden typing):" @@ -33,7 +33,7 @@ DIALOG='dialog' PWD_CMD="dialog --stdout --title $PN --passwordbox" # only if using X and gdialog + zenity are available use graphical frontend -if [ -n "$DISPLAY" -a -x $(which gdialog) -a -x $(which zenity) ] ; then +if [ -n "$DISPLAY" ] && [ -x "$(which gdialog)" ] && [ -x "$(which zenity)" ] ; then DIALOG='gdialog' PWD_CMD="zenity --title $PN --entry --hide-text" fi @@ -44,7 +44,7 @@ and therefore might not work as intended." 7 70 fi lock_desktop() { - vlock -a -n -s + sudo physlock -u "$USER" } is_passwd_set() { @@ -71,7 +71,7 @@ set_passwd() { if [ "$PASSWD1" = "$PASSWD2" ] ; then echo "$USER:$PASSWD2" | sudo chpasswd else - $DIALOG --title "$PN" --msgbox "Error: passwords to not match. Exiting." 0 0 + $DIALOG --title "$PN" --msgbox "Error: passwords do not match. Exiting." 0 0 exit 1 fi }