lintian reports a syntax error:

E: pve-manager: shell-script-fails-syntax-check etc/network/if-up.d/bridgevlan

# sh -n bridgevlan
bridgevlan: 42: bridgevlan: Syntax error: "(" unexpected (expecting "then")

I wonder if we can simply quote the regex?

diff --git a/bridgevlan b/bridgevlan
index 2e7612c..e62b8b2 100755
--- a/bridgevlan
+++ b/bridgevlan
@@ -39,7 +39,7 @@ do
   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}$ ]]
+      if [[ $port =~ "^(eth|bond|wlan)[0-9]{1,2}$" ]]
       then
         if [ -n "$IF_BRIDGE_VIDS" ]
        then

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to