summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-04-11 18:33:06 -0700
committerBen Pfaff <blp@nicira.com>2011-04-29 14:31:50 -0700
commit0725fe8cc5789b7ac13b69880ba072b153f571ad (patch)
tree22bd9c560650b6238a652423a914a12097a95688
parent280c6e99fd5fcdaff5af6990f0c346d113d90cde (diff)
downloadopenvswitch-0725fe8cc5789b7ac13b69880ba072b153f571ad.tar.gz
xenserver: Don't openvswitch-xapi-update in bridge mode.
This commit causes the init scripts not to call the openvswitch-cfg-update plugin when in bridge mode.
-rwxr-xr-xxenserver/etc_init.d_openvswitch-xapi-update17
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 7b2efd1c8..14d2cc9bd 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
}