summaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/connections/ethernet2
1 files changed, 1 insertions, 1 deletions
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