net/ifconfig net/iproute2: support lookup ifconfig/ip dynamically

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2012-01-04 16:37:33 -05:00
parent 1771a83b92
commit f583030e3c
2 changed files with 11 additions and 2 deletions

View File

@ -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
}

View File

@ -6,7 +6,7 @@ _ip()
if [ -x /bin/ip ]; then
echo /bin/ip
else
echo /sbin/ip
which ip 2>/dev/null
fi
}