X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fetc_init.d_openvswitch-xapi-update;h=14d2cc9bd78faf8555f683bce80c1c71bbfd8f91;hb=44445cac40bec2b2f12e8baf7bbb7fcf32fcbb42;hp=7b2efd1c8f88ea4785a7c5ddf802ce9cfef46809;hpb=72dfb3b4c9470ec7aa65483216291b07cc9efca7;p=openvswitch diff --git a/xenserver/etc_init.d_openvswitch-xapi-update b/xenserver/etc_init.d_openvswitch-xapi-update index 7b2efd1c..14d2cc9b 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 }