diff options
-rwxr-xr-x | rc.d/init.d/network | 17 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup | 6 |
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} || { |