xenserver: Add defaults for ENABLE_BRCOMPAT, ENABLE_FAKE_PROC_NET.
authorPatrick Mullaney <pm.mullaney@gmail.com>
Wed, 15 Dec 2010 18:41:13 +0000 (10:41 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 7 Jan 2011 18:31:30 +0000 (10:31 -0800)
On non-XenServer systems there is no $PRODUCT_VERSION to test for default
behavior, so use reasonable defaults in that case.

Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
xenserver/etc_init.d_openvswitch

index b0f8f620d43ad2a560f320d6357d5bce056ab650..fc89a3e919ce8b65dd5fcf509c8954cdd44114e7 100755 (executable)
@@ -76,14 +76,19 @@ case ${NETWORK_MODE:=openvswitch} in
 esac
 
 # 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.
+if [ -f /etc/xensource-inventory ]; then
+    if test "$PRODUCT_VERSION" = "5.5.0"; then
+        # XenServer 5.5.0 needs ovs-brcompatd and /proc/net simulation.
+        : ${ENABLE_BRCOMPAT:=y}
+        : ${ENABLE_FAKE_PROC_NET:=y}
+    else
+        # Later versions don't need them.
+        : ${ENABLE_BRCOMPAT:=n}
+        : ${ENABLE_FAKE_PROC_NET:=n}
+    fi
+else
     : ${ENABLE_BRCOMPAT:=y}
     : ${ENABLE_FAKE_PROC_NET:=y}
-else
-    # Later versions don't need them.
-    : ${ENABLE_BRCOMPAT:=n}
-    : ${ENABLE_FAKE_PROC_NET:=n}
 fi
 : ${ENABLE_MONITOR:=y}
 : ${FORCE_COREFILES:=y}