[ovs-dev] [patch] debian: Make the init script's start command idempotent

Ben Pfaff blp at nicira.com
Wed Oct 13 16:43:52 UTC 2010


On Wed, Oct 13, 2010 at 07:09:54AM +0900, Simon Horman wrote:
> Index: openvswitch/debian/openvswitch-switch.init
> ===================================================================
> --- openvswitch.orig/debian/openvswitch-switch.init	2010-10-13 07:05:08.000000000 +0900
> +++ openvswitch/debian/openvswitch-switch.init	2010-10-13 07:07:08.000000000 +0900
> @@ -209,7 +209,7 @@ case "$1" in
>              ovsdb-tool -vANY:console:emer \
>                  create /etc/openvswitch/conf.db \
>                  /usr/share/openvswitch/vswitch.ovsschema
> -        else
> +        elif ! running ovs-vswitchd; then
>              # Upgrade or downgrade schema and compact database.
>              ovsdb-tool -vANY:console:emer \
>                  convert /etc/openvswitch/conf.db \

The above should really test whether ovsdb-server is running, since
ovsdb-server is what locks the database.

Otherwise this looks good, if you'll resubmit with that small tweak I'll
push this.

Thanks,

Ben.




More information about the dev mailing list