summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2015-03-28 06:16:10 +0300
committerEric Koegel <eric.koegel@gmail.com>2015-03-28 06:16:10 +0300
commit495aac78058cd78e2d34505af204e72a1b4f19ac (patch)
tree2e642d5d10132ca099205e59f5c380e8fe720e34 /scripts
parente940818853582290af21bf38d73ee26143d500ad (diff)
downloadxfce4-session-495aac78058cd78e2d34505af204e72a1b4f19ac.tar.gz
Xflock: bypass null/blank LockCommand parameter (Bug #11764)
Commit http://git.xfce.org/xfce/xfce4-session/commit/?id=e940818853582290af21bf38d73ee26143d500ad breaks xflock4 functionality if the xfconf LockCommand parameter doesn't exist or is a blank entry. The $lock_cmd >/dev/null 2>&1 && exit will run a blank (empty string) and then exist, never getting to the other items in the list. Bug report and patch provided by ToZ.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/xflock44
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/xflock4 b/scripts/xflock4
index 7d857d37..32770b44 100644
--- a/scripts/xflock4
+++ b/scripts/xflock4
@@ -33,7 +33,9 @@ for lock_cmd in \
"xscreensaver-command -lock" \
"gnome-screensaver-command --lock"
do
- $lock_cmd >/dev/null 2>&1 && exit
+ if [ ! -z "$lock_cmd" ]; then
+ $lock_cmd >/dev/null 2>&1 && exit
+ fi
done
# else run another access locking utility, if installed