From ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 31 Jan 2003 21:28:49 +0000 Subject: 802.1Q VLAN support (, #82593) --- rc.d/init.d/network | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'rc.d/init.d/network') diff --git a/rc.d/init.d/network b/rc.d/init.d/network index e7fd388f..fc8237b8 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -33,6 +33,9 @@ fi # Even if IPX is configured, without the utilities we can't do much [ ! -x /sbin/ipx_internal_net -o ! -x /sbin/ipx_configure ] && IPX= +# Even if VLAN is configured, without the utility we can't do much +[ ! -x /sbin/vconfig ] && VLAN= + # If IPv6 is explicitly configured, make sure it's available. if [ "$NETWORKING_IPV6" = "yes" ]; then alias=`modprobe -c | awk '/^alias net-pf-10 / { print $3 }'` @@ -50,7 +53,7 @@ cd /etc/sysconfig/network-scripts # ignore aliases, alternative configurations, and editor backup files interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \ LANG=C egrep -v '(~|\.bak)$' | \ - LANG=C egrep 'ifcfg-[A-Za-z0-9_-]+$' | \ + LANG=C egrep 'ifcfg-[A-Za-z0-9\._-]+$' | \ sed 's/^ifcfg-//g'` # See how we were called. @@ -78,6 +81,16 @@ case "$1" in ;; esac + case "$VLAN" in + yes|true) + if [ -d /proc/net/vlan ] || modprobe 8021q >/dev/null 2>&1 ; then + action $"Setting 802.1Q VLAN parameters: " /sbin/vconfig set_name_type DEV_PLUS_VID_NO_PAD + else + echo $"No 802.1Q VLAN support available in kernel." + fi + ;; + esac + oldhotplug=`sysctl kernel.hotplug 2>/dev/null | \ awk '{ print $3 }' 2>/dev/null` sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1 -- cgit v1.2.1