summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/netcfg-menu2
-rwxr-xr-xscripts/pm-utils2
-rwxr-xr-xscripts/wifi-menu5
-rw-r--r--src/connections/ethernet2
4 files changed, 6 insertions, 5 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
diff --git a/scripts/pm-utils b/scripts/pm-utils
index 311851f..93ee763 100755
--- a/scripts/pm-utils
+++ b/scripts/pm-utils
@@ -10,7 +10,7 @@ resume_netcfg() {
netcfg all-resume
}
-if [ -x /usr/bin/netcfg ]; then
+if type netcfg > /dev/null; then
case "$1" in
hibernate|suspend)
suspend_netcfg
diff --git a/scripts/wifi-menu b/scripts/wifi-menu
index 96f6de1..1140b85 100755
--- a/scripts/wifi-menu
+++ b/scripts/wifi-menu
@@ -193,6 +193,9 @@ fi
if [[ $(id -u) -ne 0 ]]; then
exit_stderr "This script needs to be run with root privileges"
fi
+if ! type dialog &> /dev/null; then
+ exit_stderr "Please install 'dialog' to use wifi-menu"
+fi
INTERFACE=${1-$WIRELESS_INTERFACE}
if [[ -z "$INTERFACE" ]]; then
@@ -245,7 +248,6 @@ case $RETURN in
report_err "No networks found"
;;
4) # Unable to create profile
- clear
report_err "Could not create a profile for '$CHOICE'"
;;
255) # ESC or error
@@ -253,7 +255,6 @@ case $RETURN in
report_err "Aborted"
;;
*) # Should not happen
- clear
report_err "Unexpected return code from dialog: $RETURN"
RETURN=7
;;
diff --git a/src/connections/ethernet b/src/connections/ethernet
index 97875f8..e51f68d 100644
--- a/src/connections/ethernet
+++ b/src/connections/ethernet
@@ -143,7 +143,7 @@ ethernet_up() {
case "$IP6" in
dhcp*)
- if [[ ! -x /usr/sbin/dhclient ]]; then
+ if ! type dhclient &>/dev/null; then
report_fail "You need to install dhclient to use DHCPv6."
stop_80211x
return 1