From 4ea279313a5c91c0980381ab29c1f5459305d104 Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Wed, 20 Oct 2010 19:27:23 -0600 Subject: [PATCH] adding some VLAN modprobe magic from Gentoo's OpenRC --- init.d/netif.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.d/netif.tmpl b/init.d/netif.tmpl index 4daf083..32b6a7e 100755 --- a/init.d/netif.tmpl +++ b/init.d/netif.tmpl @@ -64,6 +64,13 @@ start() { /sbin/nameif ${interface} ${macaddr} fi if [ "$vlanmode" != "off" ]; then + if [ ! -d /proc/net/vlan ]; then + modprobe 8021q + if [ ! -d /proc/net/vlan ]; then + eerror "VLAN for interface $interface could not be configured:" + die " \n802.1q support is not present in this kernel." + fi + fi require trunk vlan ip link add dev ${interface} link ${trunk} type vlan id ${vlan} || die "Couldn't configure VLAN ${vlan} on ${trunk}" fi