summaryrefslogtreecommitdiffstats
path: root/scripts/netcfg-menu
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-06-12 22:35:39 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-06-12 22:35:39 +0200
commiteeb82be0eb59a680309858fe9a42261451bc2897 (patch)
tree0c3135d3bc4e2942e71bbf8c7bb538562f002649 /scripts/netcfg-menu
parent964f899f665a14455b527890f445f6cb2f1d4576 (diff)
downloadnetctl-eeb82be0eb59a680309858fe9a42261451bc2897.tar.gz
netctl-eeb82be0eb59a680309858fe9a42261451bc2897.tar.xz
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.
Diffstat (limited to 'scripts/netcfg-menu')
-rwxr-xr-xscripts/netcfg-menu2
1 files changed, 1 insertions, 1 deletions
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