diff options
author | Loïc Minier <lool@dooz.org> | 2007-09-30 17:06:47 +0200 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2007-09-30 17:06:47 +0200 |
commit | ce9dab29f7279dc93fbf00afd920d2cc8e72bb23 (patch) | |
tree | 4ffc51aa9b6b369b3bf20b1d099286e3eec6bc42 /debian/network/if-post-down.d/vlan | |
parent | fa2ab9cbb3615571bfbe635514fb1d8322aa0ff3 (diff) |
Big cleanup to build and rules; misc fixes for obsolete constructions
Diffstat (limited to 'debian/network/if-post-down.d/vlan')
-rw-r--r-- | debian/network/if-post-down.d/vlan | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/network/if-post-down.d/vlan b/debian/network/if-post-down.d/vlan new file mode 100644 index 0000000..bbc1c44 --- /dev/null +++ b/debian/network/if-post-down.d/vlan @@ -0,0 +1,27 @@ +#!/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 + # Ignore any alias (#272891) + *:*) exit 0 + ;; + 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/"` + ;; + # Test for vlan raw device (#196890, #292648) + *) [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0 + ;; +esac + +if [ ! -x /sbin/vconfig ] +then + exit 0 +fi + +vconfig rem $IFACE |