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.
This commit is contained in:
parent
f2e404ab66
commit
61e05331d1
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
14
net/vlan.sh
14
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user