projects
/
grml-scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
grml-chroot: iff /proc/cmdline exists don't try to mount again
[grml-scripts.git]
/
usr_bin
/
grml-lock
diff --git
a/usr_bin/grml-lock
b/usr_bin/grml-lock
index
e3c775c
..
ac05958
100755
(executable)
--- 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
echo "${PN}: wrapper script to lock desktop
This script is a wrapper to lock your desktop session
-through the
v
lock application.
+through the
phys
lock application.
Usage: just execute $PN without any further options."
exit 0
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
if [ -r /etc/grml/script-functions ] ; then
. /etc/grml/script-functions
- check4progs
v
lock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; }
+ check4progs
phys
lock sudo chpasswd dialog || { echo "Sorry, necessary tools missing - can not continue. Exiting.">&2 ; exit 1 ; }
fi
PWD_TEXT1="Set password (hidden typing):"
fi
PWD_TEXT1="Set password (hidden typing):"
@@
-44,7
+44,12
@@
and therefore might not work as intended." 7 70
fi
lock_desktop() {
fi
lock_desktop() {
- vlock -a -n -s
+ # be backwards compatible, see https://github.com/grml/grml/issues/87
+ if physlock --help 2>&1 | grep -q -- '-u user' ; then
+ sudo physlock -u "$USER"
+ else
+ sudo physlock
+ fi
}
is_passwd_set() {
}
is_passwd_set() {
@@
-71,7
+76,7
@@
set_passwd() {
if [ "$PASSWD1" = "$PASSWD2" ] ; then
echo "$USER:$PASSWD2" | sudo chpasswd
else
if [ "$PASSWD1" = "$PASSWD2" ] ; then
echo "$USER:$PASSWD2" | sudo chpasswd
else
- $DIALOG --title "$PN" --msgbox "Error: passwords
t
o not match. Exiting." 0 0
+ $DIALOG --title "$PN" --msgbox "Error: passwords
d
o not match. Exiting." 0 0
exit 1
fi
}
exit 1
fi
}