aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/network
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-01-31 21:28:49 +0000
committerBill Nottingham <notting@redhat.com>2003-01-31 21:28:49 +0000
commitff69fd0f08a9e0d9c28a3345076dd947e1de6bf2 (patch)
tree28aed9a16cd4d9890d268fa039bdf1e03796ef70 /rc.d/init.d/network
parent8c3dbdebbec6c2eb636b8a5654a5adbb99592716 (diff)
downloadinitscripts-ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2.tar
initscripts-ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2.tar.gz
initscripts-ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2.tar.bz2
initscripts-ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2.tar.xz
initscripts-ff69fd0f08a9e0d9c28a3345076dd947e1de6bf2.zip
802.1Q VLAN support (<tis@foobar.fi>, #82593)r7-05
Diffstat (limited to 'rc.d/init.d/network')
-rwxr-xr-xrc.d/init.d/network15
1 files changed, 14 insertions, 1 deletions
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