ovs-docker : Handle pre-existing fake bridges.
authorPaul-Emmanuel Raoul <skyper@skyplabs.net>
Thu, 18 Dec 2014 00:32:35 +0000 (01:32 +0100)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 18 Dec 2014 01:27:37 +0000 (17:27 -0800)
Signed-off-by: Paul-Emmanuel Raoul <skyper@skyplabs.net>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
AUTHORS
utilities/ovs-docker

diff --git a/AUTHORS b/AUTHORS
index ed7e9b7..f6ab641 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -114,6 +114,7 @@ Padmanabhan Krishnan    kprad1@yahoo.com
 Paraneetharan Chandrasekaran    paraneetharanc@gmail.com
 Paul Fazzone            pfazzone@nicira.com
 Paul Ingram             paul@nicira.com
+Paul-Emmanuel Raoul     skyper@skyplabs.net
 Pavithra Ramesh         paramesh@vmware.com
 Philippe Jung           phil.jung@free.fr
 Pim van den Berg        pim@nethuis.nl
index 0c70890..48908b1 100755 (executable)
@@ -68,7 +68,8 @@ add_port () {
         exit 1
     fi
 
-    if ovs_vsctl --may-exist add-br "$BRIDGE"; then :; else
+    if ovs_vsctl br-exists "$BRIDGE" || \
+        ovs_vsctl add-br "$BRIDGE"; then :; else
         echo >&2 "$UTIL: Failed to create bridge $BRIDGE"
         exit 1
     fi