From 4b833b84e4d7bbdf01d959ab26ab0fdeb42c6c77 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 22 Mar 2010 23:31:48 +0100 Subject: [PATCH] grml-lock: avoid shell syntax warning if gdialog/zenity aren't available. --- debian/changelog | 6 +++++- usr_bin/grml-lock | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d9d777b..5a9ceed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Sun, 21 Mar 2010 23:24:35 +0100 + [ Michael Prokop ] + * grml-lock: avoid shell syntax warning if gdialog/zenity + aren't available. + + -- Michael Prokop Mon, 22 Mar 2010 23:31:05 +0100 grml-scripts (1.2.10) unstable; urgency=low diff --git a/usr_bin/grml-lock b/usr_bin/grml-lock index 0ef9feb..e3c775c 100755 --- a/usr_bin/grml-lock +++ b/usr_bin/grml-lock @@ -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 -- 2.1.4