summaryrefslogtreecommitdiff
path: root/net/macvlan.sh
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-01-07 15:41:43 -0600
committerWilliam Hubbs <williamh@gentoo.org>2012-01-07 15:41:43 -0600
commit61e05331d14a08fa909526fda15470a1ca4927dd (patch)
tree04477abcd098b34dd9d3c6fac8bf713169dac815 /net/macvlan.sh
parentf2e404ab66b2c7eb22de4f9d01a444225b1ff616 (diff)
downloadopenrc-61e05331d14a08fa909526fda15470a1ca4927dd.tar.gz
openrc-61e05331d14a08fa909526fda15470a1ca4927dd.tar.bz2
openrc-61e05331d14a08fa909526fda15470a1ca4927dd.tar.xz
net: make lookup of iproute2 dynamic
The iproute2, macvlan and vlan modules had several possible hard coded paths for the iproute2 binary. Now we look for it in the path.
Diffstat (limited to 'net/macvlan.sh')
-rw-r--r--net/macvlan.sh14
1 files changed, 4 insertions, 10 deletions
diff --git a/net/macvlan.sh b/net/macvlan.sh
index 422268e..ccb28ea 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
}