From: Patrick Mullaney Date: Wed, 15 Dec 2010 18:41:13 +0000 (-0800) Subject: xenserver: Add defaults for ENABLE_BRCOMPAT, ENABLE_FAKE_PROC_NET. X-Git-Tag: v1.1.0~519 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d56d35d2f4ef15c90fae7649887f6b8dc8993b97;p=sliver-openvswitch.git xenserver: Add defaults for ENABLE_BRCOMPAT, ENABLE_FAKE_PROC_NET. 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 Signed-off-by: Ben Pfaff --- diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index b0f8f620d..fc89a3e91 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -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}