summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2010-08-09 20:01:15 -0500
committerWilliam Hubbs <williamh@gentoo.org>2010-08-09 20:01:15 -0500
commitd3ccbdb5a94e61e84bdc2d82d450ee8a5e4a22f4 (patch)
treedc1eec277d6b455b03f32710ae8a4cd3d92f266a /net
parent1cdf85e1cebffd067d21bb66512dc82016a2da69 (diff)
downloadopenrc-d3ccbdb5a94e61e84bdc2d82d450ee8a5e4a22f4.tar.gz
openrc-d3ccbdb5a94e61e84bdc2d82d450ee8a5e4a22f4.tar.bz2
openrc-d3ccbdb5a94e61e84bdc2d82d450ee8a5e4a22f4.tar.xz
allow ip to be in /sbin or /bin
This makes it possible for the "ip" program in iproute2 to be installed in /sbin or /bin.
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 906a45e..09a72d7 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -1,9 +1,18 @@
# 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
+}
+
iproute2_depend()
{
- program /sbin/ip
+ program $(_ip)
provide interface
after ifconfig
}