From: Ben Pfaff Date: Thu, 3 Sep 2009 19:51:51 +0000 (-0700) Subject: xenserver: Create vswitchd configuration file if it does not exist. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1bdd85cab85bf7936685f7402e5b5b3df1d3df8;p=openvswitch 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. --- 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.