From b1bdd85cab85bf7936685f7402e5b5b3df1d3df8 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 3 Sep 2009 12:51:51 -0700 Subject: [PATCH] xenserver: Create vswitchd configuration file if it does not exist. /etc/ovs-vswitchd.conf should always be there. Nevertheless, it is not nice to entirely break vswitch if it is accidentally deleted. This commit makes /etc/init.d/vswitch create an empty configuration file if it is missing. Bug #1821. --- xenserver/etc_init.d_vswitch | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index abd594ec..ee858fda 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -286,6 +286,11 @@ function start { # ovs-vswitchd needs a few per bridge ulimit -n 4096 + if [ ! -e "$VSWITCHD_CONF" ]; then + warning "$VSWITCHD_CONF does not exist" + action "Creating empty $VSWITCHD_CONF" touch "$VSWITCHD_CONF" + fi + start_vswitchd start_brcompatd reload_vswitchd # ensures ovs-vswitchd has fully read config file. -- 2.30.2