From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RjeG2-00069I-Lh for garchives@archives.gentoo.org; Sat, 07 Jan 2012 21:56:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B228B21C044; Sat, 7 Jan 2012 21:56:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 868AF21C044 for ; Sat, 7 Jan 2012 21:56:51 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04EF01B4023 for ; Sat, 7 Jan 2012 21:56:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 3CFB680042 for ; Sat, 7 Jan 2012 21:56:50 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <61e05331d14a08fa909526fda15470a1ca4927dd.WilliamH@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/iproute2.sh net/macvlan.sh net/vlan.sh X-VCS-Directories: net/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 61e05331d14a08fa909526fda15470a1ca4927dd Date: Sat, 7 Jan 2012 21:56:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 20edc06f-232e-460a-b3d5-6328343b5cd8 X-Archives-Hash: 55b26f7c47b1b02cd874e256bdf2852a commit: 61e05331d14a08fa909526fda15470a1ca4927dd Author: William Hubbs gentoo org> AuthorDate: Sat Jan 7 21:41:43 2012 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Jan 7 21:41:43 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D61e05331 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. --- net/iproute2.sh | 14 ++++---------- net/macvlan.sh | 14 ++++---------- net/vlan.sh | 14 ++++---------- 3 files changed, 12 insertions(+), 30 deletions(-) diff --git a/net/iproute2.sh b/net/iproute2.sh index bb52e98..16d9a60 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -1,18 +1,12 @@ # Copyright (c) 2007-2008 Roy Marples # Released under the 2-clause BSD license. =20 -_ip() -{ - if [ -x /bin/ip ]; then - echo /bin/ip - else - echo /sbin/ip - fi -} - iproute2_depend() { - program $(_ip) + local x + x=3D$(_which ip) + [ -z "$x" ] && return 1 + program $x provide interface after ifconfig } 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 # All rights reserved. Released under the 2-clause BSD license. =20 -_ip() -{ - if [ -x /bin/ip ]; then - echo /bin/ip - else - echo /sbin/ip - fi -} - macvlan_depend() { - program $(_ip) + local x + x=3D$(_which ip) + [ -z "${X}" ] && return 1 + program $x after interface before dhcp macchanger } diff --git a/net/vlan.sh b/net/vlan.sh index 960cd09..ec30dd6 100644 --- a/net/vlan.sh +++ b/net/vlan.sh @@ -1,18 +1,12 @@ # Copyright (c) 2007-2008 Roy Marples # Released under the 2-clause BSD license. =20 -_ip() -{ - if [ -x /bin/ip ]; then - echo /bin/ip - else - echo /sbin/ip - fi -} - vlan_depend() { - program $(_ip) + local x + x=3D$(_which ip) + [ -z "$x" ] && return 1 + program $x after interface before dhcp }