xenserver: Create network.conf before running interface-reconfigure.
authorBen Pfaff <blp@nicira.com>
Wed, 9 Jun 2010 20:56:56 +0000 (13:56 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 15 Jun 2010 17:47:57 +0000 (10:47 -0700)
XenServer 5.5.0 doesn't have /etc/xensource/network.conf, but the
interface-reconfigure that OVS installs issues an error and aborts if it
does not exist, so create network.conf before trying to run it.

CC: Paul Ingram <paul@nicira.com>
xenserver/openvswitch-xen.spec

index 67dd26d29f8c36bc39aed70948731ab6bebe8be8..debb2fd9af8dfcabe8868f37e6607134e11ca058 100644 (file)
@@ -172,8 +172,15 @@ if test "$PRODUCT_VERSION" = "5.5.0"; then
     fi
     rm -f $XSS
     ln -s $RNU $XSS
+
+    # If /etc/xensource/network.conf doesn't exist (it was added in 5.6.0),
+    # then interface-reconfigure will be unhappy when we run it below.
+    if test ! -e /etc/xensource/network.conf; then
+        echo bridge > /etc/xensource/network.conf
+    fi
 fi
 
+
 if test ! -e /var/xapi/network.dbcache; then
     if test "$1" = 1; then
         printf "Creating xapi database cache...  "