Handle cases where the vlan bridge has already been setup previouslly.
authorPablo Ruiz Garcia <pablo.ruiz@gmail.com>
Wed, 12 Feb 2014 07:55:29 +0000 (08:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 19 Mar 2014 05:43:23 +0000 (06:43 +0100)
Signed-off-by: Pablo Ruiz Garcia <pablo.ruiz@gmail.com>
data/PVE/Network.pm

index 73984c2..dc7ee86 100644 (file)
@@ -141,6 +141,9 @@ sub activate_bridge_vlan_slave {
         my $tbridge = basename(readlink($path));
        if ($tbridge ne $bridgevlan) {
            die "interface $ifacevlan already exist in bridge $tbridge\n";
+       } else {
+            # Port already attached to bridge: do nothing.
+            return;
        }
     }