[ovs-dev] [PATCH 2/2] xenserver: Only call xapi-update in vswitch mode.

Ethan Jackson ethan at nicira.com
Tue Apr 12 01:33:33 UTC 2011


---
 xenserver/etc_init.d_openvswitch-xapi-update |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/xenserver/etc_init.d_openvswitch-xapi-update b/xenserver/etc_init.d_openvswitch-xapi-update
index 7b2efd1..14d2cc9 100755
--- a/xenserver/etc_init.d_openvswitch-xapi-update
+++ b/xenserver/etc_init.d_openvswitch-xapi-update
@@ -39,6 +39,23 @@ function start {
         printf "openvswitch-xapi-update ERROR: XenSource inventory not present in /etc/xensource-inventory\n"
         exit 1
     fi
+
+    if test -e /etc/xensource/network.conf; then
+        NETWORK_MODE=$(cat /etc/xensource/network.conf)
+    fi
+
+    case ${NETWORK_MODE:=openvswitch} in
+        vswitch|openvswitch)
+            ;;
+        bridge)
+            exit 0
+            ;;
+        *)
+            echo "Open vSwitch disabled (/etc/xensource/network.conf is invalid)" >&2
+            exit 0
+            ;;
+    esac
+
     source /etc/xensource-inventory
     action "Updating configuration" do_host_call
 }
-- 
1.7.4.2




More information about the dev mailing list