]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - bin/xlockscreen
bin/xlockscreen: use exec where possible
[config/dotfiles.git] / bin / xlockscreen
index 741d6f12cb8980f8c7c0895ee8a5079740d4b0cc..2997692652d50037bf33fbf6cc607b98aa2a42eb 100755 (executable)
@@ -57,13 +57,13 @@ if test x"$1" = xstart; then
         xscreensaver >/dev/null &
         echo xscreensaver
     elif installed xautolock; then
-        if installed "$lock_bin"; then
+        if installed "$lock_binary"; then
             xautolock -secure -time "$lock_time_minutes" \
                       -locker "$lock_binary" \
                       >/dev/null &
             echo xautolock
         else
-            echo "Locker '$lock_bin' not installed. Auto lock won't work!"
+            echo "Locker '$lock_binary' not installed. Auto lock won't work!"
             exit 1
         fi
     else
@@ -89,7 +89,9 @@ elif test x"$1" = xlock; then
     elif installed xtrlock; then
         # Sleep is necessary to allow xtrlock to grab the keyboard input.
         sleep 1
-        xtrlock
+        exec xtrlock
+    elif installed xlock; then
+        exec xlock
     else
         echo 'No screen locker found!'
         exit 1