Skip to content

Commit

Permalink
adding some VLAN modprobe magic from Gentoo's OpenRC
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrobbins committed Oct 21, 2010
1 parent 870daa2 commit 4ea2793
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions init.d/netif.tmpl
Expand Up @@ -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
Expand Down

0 comments on commit 4ea2793

Please sign in to comment.