From d56d35d2f4ef15c90fae7649887f6b8dc8993b97 Mon Sep 17 00:00:00 2001 From: Patrick Mullaney Date: Wed, 15 Dec 2010 10:41:13 -0800 Subject: [PATCH] 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 --- xenserver/etc_init.d_openvswitch | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index b0f8f620..fc89a3e9 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} -- 2.30.2