aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-06-07 19:16:04 +0000
committerBill Nottingham <notting@redhat.com>2004-06-07 19:16:04 +0000
commitdf05d00c3e64dec541cd615d67565a71da0c4a0f (patch)
tree163f0662cd5102b2defd42837f532fbe98824981
parent19e0b412145b58e4dd1b403acc062f669b220b16 (diff)
downloadinitscripts-df05d00c3e64dec541cd615d67565a71da0c4a0f.tar
initscripts-df05d00c3e64dec541cd615d67565a71da0c4a0f.tar.gz
initscripts-df05d00c3e64dec541cd615d67565a71da0c4a0f.tar.bz2
initscripts-df05d00c3e64dec541cd615d67565a71da0c4a0f.tar.xz
initscripts-df05d00c3e64dec541cd615d67565a71da0c4a0f.zip
vlan fixes (#107504, <hrunting@texas.net>)
-rwxr-xr-xrc.d/init.d/network17
-rwxr-xr-xsysconfig/network-scripts/ifdown2
-rwxr-xr-xsysconfig/network-scripts/ifup6
3 files changed, 19 insertions, 6 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index a3aeb0e0..e2045812 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -96,6 +96,7 @@ case "$1" in
awk '{ print $3 }' 2>/dev/null`
sysctl -w kernel.hotplug="/bin/true" > /dev/null 2>&1
+ vlaninterfaces=""
cipeinterfaces=""
xdslinterfaces=""
@@ -117,6 +118,12 @@ case "$1" in
unset DEVICE TYPE SLAVE
continue
fi
+
+ if [ "${DEVICE%%.*}" != "$DEVICE" ] ; then
+ vlaninterfaces="$vlaninterfaces $i"
+ unset DEVICE TYPE SLAVE BRIDGE
+ continue
+ fi
if [ "$SLAVE" = "yes" ]; then
unset DEVICE TYPE SLAVE
@@ -138,7 +145,7 @@ case "$1" in
done
# Bring up xDSL and CIPE interfaces
- for i in $xdslinterfaces $cipeinterfaces ; do
+ for i in $vlaninterfaces $xdslinterfaces $cipeinterfaces ; do
if ! LANG=C egrep -L "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then
# If we're in confirmation mode, get user confirmation.
if [ -f /var/run/confirm ]; then
@@ -189,6 +196,7 @@ case "$1" in
fi
fi
+ vlaninterfaces=""
cipeinterfaces=""
xdslinterfaces=""
@@ -208,10 +216,15 @@ case "$1" in
unset DEVICE TYPE
continue
fi
+ if [ "${DEVICE%%.*}" != "$DEVICE" ]; then
+ vlaninterfaces="$vlaninterfaces $i"
+ unset DEVICE TYPE
+ continue
+ fi
unset DEVICE TYPE
done
- for i in $cipeinterfaces $xdslinterfaces ; do
+ for i in $cipeinterfaces $xdslinterfaces $vlaninterfaces ; do
eval $(fgrep "DEVICE=" ifcfg-$i)
if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 7aa852ca..a7527e30 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -124,7 +124,7 @@ fi
if [ -n "$VLAN" -a -x /sbin/vconfig ]; then
# 802.1q VLAN
- if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q 'eth[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' ; then
+ if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' ; then
[ -f /proc/net/vlan/${DEVICE} ] && {
/sbin/vconfig rem ${DEVICE}
}
diff --git a/sysconfig/network-scripts/ifup b/sysconfig/network-scripts/ifup
index 39079fd0..7fb3881c 100755
--- a/sysconfig/network-scripts/ifup
+++ b/sysconfig/network-scripts/ifup
@@ -55,7 +55,7 @@ fi
# Ethernet 802.1Q VLAN support
if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
- if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q 'eth[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' ; then
+ if echo ${DEVICE} | LANG=C egrep -v '(:)' | LANG=C egrep -q '(eth|bond)[0-9][0-9]*\.[0-9][0-9]?[0-9]?[0-9]?' ; then
if [ ! -d /proc/net/vlan ]; then
if modprobe 8021q >/dev/null 2>&1 ; then
/sbin/vconfig set_name_type DEV_PLUS_VID_NO_PAD >/dev/null 2>&1 || {
@@ -67,10 +67,10 @@ if [ -x /sbin/vconfig -a "${VLAN}" = "yes" ]; then
fi
fi
VID="`echo ${DEVICE} | \
- LANG=C egrep 'eth[0-9]+\.[0-9][0-9]?[0-9]?[0-9]?$' | \
+ LANG=C egrep '(eth|bond)[0-9]+\.[0-9][0-9]?[0-9]?[0-9]?$' | \
LANG=C sed 's/^[a-z0-9]*\.//g;s/^0*//'`"
PHYSDEV="`echo ${DEVICE} | \
- LANG=C egrep 'eth[0-9]+\.[0-9][0-9]?[0-9]?[0-9]?$' | \
+ LANG=C egrep '(eth|bond)[0-9]+\.[0-9][0-9]?[0-9]?[0-9]?$' | \
LANG=C sed 's/\.[a-z0-9]*$//g'`"
is_available ${PHYSDEV} || {