aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/iproute2.sh14
-rw-r--r--net/macvlan.sh14
-rw-r--r--net/vlan.sh14
3 files changed, 12 insertions, 30 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index bb52e983..16d9a604 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -1,18 +1,12 @@
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
-_ip()
-{
- if [ -x /bin/ip ]; then
- echo /bin/ip
- else
- echo /sbin/ip
- fi
-}
-
iproute2_depend()
{
- program $(_ip)
+ local x
+ x=$(_which ip)
+ [ -z "$x" ] && return 1
+ program $x
provide interface
after ifconfig
}
diff --git a/net/macvlan.sh b/net/macvlan.sh
index 422268e4..ccb28ea7 100644
--- a/net/macvlan.sh
+++ b/net/macvlan.sh
@@ -3,18 +3,12 @@
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
-_ip()
-{
- if [ -x /bin/ip ]; then
- echo /bin/ip
- else
- echo /sbin/ip
- fi
-}
-
macvlan_depend()
{
- program $(_ip)
+ local x
+ x=$(_which ip)
+ [ -z "${X}" ] && return 1
+ program $x
after interface
before dhcp macchanger
}
diff --git a/net/vlan.sh b/net/vlan.sh
index 960cd09b..ec30dd65 100644
--- a/net/vlan.sh
+++ b/net/vlan.sh
@@ -1,18 +1,12 @@
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.
-_ip()
-{
- if [ -x /bin/ip ]; then
- echo /bin/ip
- else
- echo /sbin/ip
- fi
-}
-
vlan_depend()
{
- program $(_ip)
+ local x
+ x=$(_which ip)
+ [ -z "$x" ] && return 1
+ program $x
after interface
before dhcp
}