Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: net/
Date: Tue, 27 Dec 2011 01:24:26
Message-Id: 415f48041056a020fa27cbd16bfd0be268bf693c.robbat2@gentoo
1 commit: 415f48041056a020fa27cbd16bfd0be268bf693c
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 27 01:21:34 2011 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 27 01:22:29 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=415f4804
7
8 net/vlan, net/macvlan: iproute2 is required for new VLAN configuration
9
10 Since commit 683a21b0a in Feburary 2011, iproute2 has been required for
11 new VLAN configuration. MACVLAN is also impossible to configure without
12 iproute2. However we did not check if iproute2 was actually in the
13 modules for a given interface, so it could end up hanging or giving
14 weird errors. Check for iproute2 before usage now.
15
16 X-Gentoo-Bug: 389437
17 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=389437
18 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
19
20 ---
21 net/macvlan.sh | 6 ++++++
22 net/vlan.sh | 8 ++++++++
23 2 files changed, 14 insertions(+), 0 deletions(-)
24
25 diff --git a/net/macvlan.sh b/net/macvlan.sh
26 index 92bcf1f..8ac75b8 100644
27 --- a/net/macvlan.sh
28 +++ b/net/macvlan.sh
29 @@ -43,6 +43,12 @@ macvlan_pre_start()
30 [ -z "${macvlan}" ] && return 0
31
32 _check_macvlan || return 1
33 +
34 + case " ${MODULES} " in
35 + *" ifconfig "*)
36 + eerror "sys-apps/iproute2 is required to configure MACVLANs"
37 + return 1 ;;
38 + esac
39
40 # optional mode, default to "private"
41 local mode=
42
43 diff --git a/net/vlan.sh b/net/vlan.sh
44 index 9cce3b9..ced5aa0 100644
45 --- a/net/vlan.sh
46 +++ b/net/vlan.sh
47 @@ -51,6 +51,14 @@ vlan_pre_start()
48 eerror "You must convert your vconfig_ VLAN entries to vlan${N} entries."
49 return 1
50 fi
51 + local vlans=
52 + eval vlans=\$vlans_${IFVAR}
53 + [ -z "$vlans" ] && return 0
54 + case " ${MODULES} " in
55 + *" ifconfig "*)
56 + eerror "sys-apps/iproute2 is required to configure VLANs"
57 + return 1 ;;
58 + esac
59 }
60
61 vlan_post_start()