grml-lock: avoid shell syntax warning if gdialog/zenity aren't available.
authorMichael Prokop <mika@grml.org>
Mon, 22 Mar 2010 22:31:48 +0000 (23:31 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 22 Mar 2010 22:31:48 +0000 (23:31 +0100)
debian/changelog
usr_bin/grml-lock

index d9d777b..5a9ceed 100644 (file)
@@ -4,7 +4,11 @@ grml-scripts (1.2.11) UNRELEASED; urgency=low
   * caps-ctrl: make sure the script works on non-Grml systems
     as well.
 
- -- Michael Prokop <mika@grml.org>  Sun, 21 Mar 2010 23:24:35 +0100
+  [ Michael Prokop ]
+  * grml-lock: avoid shell syntax warning if gdialog/zenity
+    aren't available.
+
+ -- Michael Prokop <mika@grml.org>  Mon, 22 Mar 2010 23:31:05 +0100
 
 grml-scripts (1.2.10) unstable; urgency=low
 
index 0ef9feb..e3c775c 100755 (executable)
@@ -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