]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
bridgevlan: avoid bash regex
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 30 Jul 2015 09:28:50 +0000 (11:28 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 30 Jul 2015 09:28:50 +0000 (11:28 +0200)
bridgevlan

index 2e7612ccfdac5c0449ced09e690bff9f24bd0ba1..bf9cf82e90c1842464af72912942829383cc19a1 100755 (executable)
@@ -38,16 +38,20 @@ do
   for port in $i
   do
     if [ "$MODE" = "start" ] && [ -d /sys/class/net/$IFACE/brif/$port ]; then
-      #we allow vlan to pass through attached interface
-      if [[ $port =~ ^(eth|bond|wlan)[0-9]{1,2}$ ]]
-      then
-        if [ -n "$IF_BRIDGE_VIDS" ]
-       then
-             bridge vlan add dev $port vid $IF_BRIDGE_VIDS
-       else
-             bridge vlan add dev $port vid 2-4094
-        fi
-      fi
+      case "$port" in
+       *.[0-9]*)
+           # do nothing
+       ;;
+       *)
+          # we allow vlan to pass through attached interface
+          if [ -n "$IF_BRIDGE_VIDS" ]
+         then
+            bridge vlan add dev $port vid $IF_BRIDGE_VIDS
+         else
+            bridge vlan add dev $port vid 2-4094
+          fi
+       ;;
+      esac
     fi
   done
 done