xenserver: Don't touch /etc/xensource/network.conf on upgrade.
authorAndrew Evans <aevans@nicira.com>
Fri, 11 Mar 2011 00:02:12 +0000 (16:02 -0800)
committerAndrew Evans <aevans@nicira.com>
Fri, 11 Mar 2011 00:02:12 +0000 (16:02 -0800)
The post-install script for the openvswitch userspace package always sets the
bridge type to 'vswitch'. If someone reconfigures XenServer to use the Linux
bridge instead, then upgrades Open vSwitch, their system will revert to using
Open vSwitch as the bridge.

Reported-by: Michael Mao <mmao@nicira.com>
Bug #4825.

xenserver/openvswitch-xen.spec

index ab2134e..450cd34 100644 (file)
@@ -246,10 +246,10 @@ for s in openvswitch openvswitch-xapi-update; do
     chkconfig $s on || printf "Could not enable $s init script."
 done
 
-# Configure system to use Open vSwitch
-echo vswitch > /etc/xensource/network.conf
-
 if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
+    # Configure system to use Open vSwitch
+    echo vswitch > /etc/xensource/network.conf
+
     printf "\nYou MUST reboot the server NOW to complete the change to\n"
     printf "Open vSwitch.  Attempts to modify networking on the server\n"
     printf "or any hosted VM will fail until after the reboot and could\n"