diff options
author | Ben Pfaff <blp@nicira.com> | 2010-05-04 10:20:58 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-05-04 10:20:58 -0700 |
commit | 0313fb2e2fcf1df05ea21eeaf47f22c4e0e9796c (patch) | |
tree | c7ef65228537e0f816481745f40b27feae1b0046 /xenserver/etc_init.d_openvswitch | |
parent | 3bcf3e33e9cfb7fd837086bfa8e627110d84dce8 (diff) |
xenserver: Make Open vSwitch disable itself in "bridge" mode.
When /etc/xensource/network.conf contains the word "bridge", the system
is supposed to use the Linux bridge, not Open vSwitch. This commit makes
OVS honor this setting, which until now it has mainly ignored.
Reported-by: Reid Price <reid@nicira.com>
Diffstat (limited to 'xenserver/etc_init.d_openvswitch')
-rwxr-xr-x | xenserver/etc_init.d_openvswitch | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index 2ce9e774..a15ab2b4 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -24,6 +24,12 @@ . /etc/xensource-inventory test -e /etc/sysconfig/openvswitch && . /etc/sysconfig/openvswitch +NETWORK_MODE=$(cat /etc/xensource/network.conf) +if test "$NETWORK_MODE" = bridge; then + echo "Open vSwitch disabled (/etc/xensource/network.conf is 'bridge')" >&2 + exit 0 +fi + # General config variables in /etc/sysconfig/openvswitch if test "$PRODUCT_VERSION" = "5.5.0"; then # XenServer 5.5.0 needs ovs-brcompatd and /proc/net simulation. |