[Ovirt-devel] [PATCH][NODE] Cleanup old bridges when re-running o-c-networking

Mike Burns mburns at redhat.com
Wed Jul 22 23:56:44 UTC 2009


From: Michael Burns <mburns at redhat.com>

Detects and removes existing bridges named breth*

Resolves rhbz#513062

Signed-off-by: Michael Burns <mburns at redhat.com>
---
 scripts/ovirt-config-networking |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking
index cc7626b..837d493 100755
--- a/scripts/ovirt-config-networking
+++ b/scripts/ovirt-config-networking
@@ -515,5 +515,10 @@ stop_log

 if [ "$net_configured" = 1 ]; then
     service network stop > /dev/null 2>&1
+    for i in `brctl show | grep breth | awk '{print $1}'`
+    do
+      ifconfig $i down
+      brctl delbr $i
+    done
     service network start
 fi
-- 
1.6.2.5




More information about the ovirt-devel mailing list