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 1RfLmE-0004hy-CI for garchives@archives.gentoo.org; Tue, 27 Dec 2011 01:24:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 276B421C0BF; Tue, 27 Dec 2011 01:24:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E9D4E21C0BF for ; Tue, 27 Dec 2011 01:24:18 +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 7742C1B401B for ; Tue, 27 Dec 2011 01:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 984BA80043 for ; Tue, 27 Dec 2011 01:24:17 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <415f48041056a020fa27cbd16bfd0be268bf693c.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/macvlan.sh net/vlan.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 415f48041056a020fa27cbd16bfd0be268bf693c Date: Tue, 27 Dec 2011 01:24:17 +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: 489fa1f3-271b-4600-acb3-86ed8dd40aa7 X-Archives-Hash: 80a18090db70689e3a10649ac45cec0d commit: 415f48041056a020fa27cbd16bfd0be268bf693c Author: Robin H. Johnson gentoo org> AuthorDate: Tue Dec 27 01:21:34 2011 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Dec 27 01:22:29 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D415f4804 net/vlan, net/macvlan: iproute2 is required for new VLAN configuration Since commit 683a21b0a in Feburary 2011, iproute2 has been required for new VLAN configuration. MACVLAN is also impossible to configure without iproute2. However we did not check if iproute2 was actually in the modules for a given interface, so it could end up hanging or giving weird errors. Check for iproute2 before usage now. X-Gentoo-Bug: 389437 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=3D389437 Signed-off-by: Robin H. Johnson gentoo.org> --- net/macvlan.sh | 6 ++++++ net/vlan.sh | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/net/macvlan.sh b/net/macvlan.sh index 92bcf1f..8ac75b8 100644 --- a/net/macvlan.sh +++ b/net/macvlan.sh @@ -43,6 +43,12 @@ macvlan_pre_start() [ -z "${macvlan}" ] && return 0 =20 _check_macvlan || return 1 +=09 + case " ${MODULES} " in + *" ifconfig "*) + eerror "sys-apps/iproute2 is required to configure MACVLANs" + return 1 ;; + esac =20 # optional mode, default to "private" local mode=3D diff --git a/net/vlan.sh b/net/vlan.sh index 9cce3b9..ced5aa0 100644 --- a/net/vlan.sh +++ b/net/vlan.sh @@ -51,6 +51,14 @@ vlan_pre_start() eerror "You must convert your vconfig_ VLAN entries to vlan${N} entrie= s." return 1 fi + local vlans=3D + eval vlans=3D\$vlans_${IFVAR} + [ -z "$vlans" ] && return 0 + case " ${MODULES} " in + *" ifconfig "*) + eerror "sys-apps/iproute2 is required to configure VLANs" + return 1 ;; + esac } =20 vlan_post_start()