0
0
Fork 0
easterhegg-2005-website/noc/configs/network/if-post-down.d/vlan

28 lines
541 B
Plaintext
Raw Normal View History

2024-01-27 15:10:12 +01:00
#!/bin/sh
# If IFACE is an automagic vlan interface (without the vlan-raw-device
# parameter) then let's try to discover the magic here.. Another way would be
# to just probe for the right device name in /proc/net/vlan
case "$IFACE" in
eth*.0*)
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
;;
eth*.*)
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/"`
;;
*) exit 0
;;
esac
if [ -z "$IF_VLAN_RAW_DEVICE" ]
then
exit 0
fi
if [ ! -x /sbin/vconfig ]
then
exit 0
fi
vconfig rem $IFACE