aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 992fd5ae..29fb9674 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -122,4 +122,14 @@ if [ "$retcode" = 0 ] ; then
# the interface went down.
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
+ [ -f /proc/net/vlan/${DEVICE} ] && {
+ /sbin/vconfig rem ${DEVICE}
+ retcode=$?
+ }
+ fi
+fi
+
exit $retcode