summaryrefslogtreecommitdiff
path: root/debian/network/if-pre-up.d/vlan
diff options
context:
space:
mode:
Diffstat (limited to 'debian/network/if-pre-up.d/vlan')
-rw-r--r--debian/network/if-pre-up.d/vlan6
1 files changed, 4 insertions, 2 deletions
diff --git a/debian/network/if-pre-up.d/vlan b/debian/network/if-pre-up.d/vlan
index 391c2ec..1580fc2 100644
--- a/debian/network/if-pre-up.d/vlan
+++ b/debian/network/if-pre-up.d/vlan
@@ -17,14 +17,16 @@ case "$IFACE" in
;;
eth*.0*|bond*.0*|wlan*.0*)
# Silently ignore interfaces which ifupdown handles on its own
- [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
+ # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils
+ [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0
vconfig set_name_type DEV_PLUS_VID
VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//;s/wlan[0-9][0-9]*\.0*//"`
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`
;;
eth*.*|bond*.*|wlan*.*)
# Silently ignore interfaces which ifupdown handles on its own
- [ -z "$IF_VLAN_RAW_DEVICE" ] && exit 0
+ # If IF_BRIDGE_PORTS is set, probably we're called by bridge-utils
+ [ -z "$IF_VLAN_RAW_DEVICE" -a -z "$IF_BRIDGE_PORTS" ] && exit 0
vconfig set_name_type DEV_PLUS_VID_NO_PAD
VLANID=`echo $IFACE|sed "s/eth[0-9][0-9]*\.0*//g;s/bond[0-9][0-9]*\.0*//g;s/wlan[0-9][0-9]*\.0*//g"`
IF_VLAN_RAW_DEVICE=`echo $IFACE|sed "s/\(eth[0-9][0-9]*\)\..*/\1/;s/\(bond[0-9][0-9]*\)\..*/\1/;s/\(wlan[0-9][0-9]*\)\..*/\1/"`