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 <gentoo-commits+bounces-408350-garchives=archives.gentoo.org@lists.gentoo.org>) id 1RaNy3-0000Tc-Fv for garchives@archives.gentoo.org; Tue, 13 Dec 2011 08:44:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B9DA21C02C; Tue, 13 Dec 2011 08:43:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 6F36121C02C for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2011 08:43:59 +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 EB5F51B4021 for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2011 08:43:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 303918004A for <gentoo-commits@lists.gentoo.org>; Tue, 13 Dec 2011 08:43:58 +0000 (UTC) From: "Robin H. Johnson" <robbat2@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" <robbat2@gentoo.org> Message-ID: <879e1acd5dc04eee1f7b0cb49d9c1a84e28c525c.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/ifconfig.sh.Linux.in net/iproute2.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 879e1acd5dc04eee1f7b0cb49d9c1a84e28c525c Date: Tue, 13 Dec 2011 08:43:58 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d9f2bd5e-907c-460a-8923-40e8146f3836 X-Archives-Hash: 5e3a221c5de153e4c4ed63a0945f9961 commit: 879e1acd5dc04eee1f7b0cb49d9c1a84e28c525c Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> AuthorDate: Tue Dec 13 08:43:18 2011 +0000 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> CommitDate: Tue Dec 13 08:43:18 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D879e1acd net: Support more variants of address family specification. This includes address family specifications methods to help debug bug 358235 further. Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> --- net/ifconfig.sh.Linux.in | 6 ++++++ net/iproute2.sh | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 1ac0dd5..80a0b98 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -188,6 +188,12 @@ _add_route() if [ "$1" =3D "-A" -o "$1" =3D "-f" -o "$1" =3D "-family" ]; then family=3D"-A $2" shift; shift + elif [ "$1" =3D "-4" ]; then + family=3D"-A inet" + shift + elif [ "$1" =3D "-6" ]; then + family=3D"-A inet6" + shift fi =20 if [ -n "${metric}" ]; then diff --git a/net/iproute2.sh b/net/iproute2.sh index 4e7e88c..c8f670c 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -149,6 +149,12 @@ _add_route() if [ "$1" =3D "-A" -o "$1" =3D "-f" -o "$1" =3D "-family" ]; then family=3D"-f $2" shift; shift + elif [ "$1" =3D "-4" ]; then + family=3D"-f inet" + shift + elif [ "$1" =3D "-6" ]; then + family=3D"-f inet6" + shift fi =20 if [ $# -eq 3 ]; then @@ -212,10 +218,7 @@ _trim() { # This allows for advanced routing tricks _ip_rule_runner() { local cmd rules OIFS=3D"${IFS}" family - if [ "x$1" =3D "-4" ]; then - family=3D"$1" - shift - elif [ "x$1" =3D "-6" ]; then + if [ "$1" =3D "-4" -o "$1" =3D "-6" ]; then family=3D"$1" shift else