[ovs-dev] [PATCH] xenserver: Create vswitchd configuration file if it does not exist.

Justin Pettit jpettit at nicira.com
Thu Sep 3 19:56:04 UTC 2009


Looks good.

--Justin


On Sep 3, 2009, at 12:51 PM, Ben Pfaff wrote:

> /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 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/xenserver/etc_init.d_vswitch b/xenserver/ 
> etc_init.d_vswitch
> index abd594e..ee858fd 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.
> -- 
> 1.6.3.3
>
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org





More information about the dev mailing list