From eeb82be0eb59a680309858fe9a42261451bc2897 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 12 Jun 2012 22:35:39 +0200 Subject: New style to check command availability When we don't really care which file implements the needed command (i.e. we don't call it by its full path), we use type to establish availability of the command. In wifi-menu we add a check for the dialog command and remove potential clearing of relevant error messages. --- scripts/netcfg-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/netcfg-menu') diff --git a/scripts/netcfg-menu b/scripts/netcfg-menu index b6aa402..d0db762 100755 --- a/scripts/netcfg-menu +++ b/scripts/netcfg-menu @@ -2,7 +2,7 @@ . /usr/lib/network/network -if [[ ! -x /usr/bin/dialog ]]; then +if ! type dialog &> /dev/null; then echo "Please install 'dialog' to use netcfg-menu" exit 1 fi -- cgit v1.2.3-24-g4f1b