[pve-devel] [PATCH 2/3] Handle cases where the vlan bridge has already been setup previouslly.

Pablo Ruiz Garcia pablo.ruiz at gmail.com
Wed Feb 12 08:55:29 CET 2014


Signed-off-by: Pablo Ruiz Garcia <pablo.ruiz at gmail.com>
---
 data/PVE/Network.pm |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/data/PVE/Network.pm b/data/PVE/Network.pm
index d5550a3..96cf20b 100644
--- a/data/PVE/Network.pm
+++ b/data/PVE/Network.pm
@@ -142,6 +142,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;
 	}
     }
 
-- 
1.7.9




More information about the pve-devel mailing list