net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
1771a83b92
commit
f583030e3c
@ -1,9 +1,18 @@
|
||||
# Copyright (c) 2007-2008 Roy Marples <roy@marples.name>
|
||||
# Released under the 2-clause BSD license.
|
||||
|
||||
_ifconfig()
|
||||
{
|
||||
if [ -x /bin/ifconfig ]; then
|
||||
echo /bin/ifconfig
|
||||
else
|
||||
which ifconfig 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
ifconfig_depend()
|
||||
{
|
||||
program /sbin/ifconfig
|
||||
program $(_ifconfig)
|
||||
provide interface
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ _ip()
|
||||
if [ -x /bin/ip ]; then
|
||||
echo /bin/ip
|
||||
else
|
||||
echo /sbin/ip
|
||||
which ip 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user