X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=xenserver%2Fetc_init.d_openvswitch;h=9c0fe80b15808aead643134f49dc9641bc82e09a;hb=1e827902be9194d71ea851c9ce2676f65eeed33a;hp=b2248b7addbe43c90d13cbbdd177757e6ccc578f;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=sliver-openvswitch.git diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index b2248b7ad..9c0fe80b1 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -54,7 +54,7 @@ start_ovs_xapi_sync () { } start () { - set $ovs_ctl ${1-start} + set ovs_ctl ${1-start} set "$@" --system-id="$INSTALLATION_UUID" set "$@" --system-type="$PRODUCT_BRAND" set "$@" --system-version="$PRODUCT_VERSION-$BUILD_NUMBER" @@ -76,11 +76,12 @@ start () { touch /var/run/openvswitch.booted set "$@" --delete-bridges fi + set "$@" $OVS_CTL_OPTS "$@" start_ovs_xapi_sync - $ovs_ctl --protocol=gre enable-protocol + ovs_ctl --protocol=gre enable-protocol touch /var/lock/subsys/openvswitch } @@ -101,12 +102,21 @@ force_reload_kmod () { } stop () { - $ovs_ctl stop + ovs_ctl stop stop_daemon ovs-xapi-sync rm -f /var/lock/subsys/openvswitch } -ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl +restart () { + if [ "$1" = "--save-flows=yes" ]; then + stop_daemon ovs-xapi-sync + start restart + else + stop + start + fi +} + case $1 in start) start @@ -115,8 +125,8 @@ case $1 in stop ;; restart) - stop - start + shift + restart "$@" ;; reload|force-reload) # The main OVS daemons keep up-to-date, but ovs-xapi-sync needs help. @@ -126,10 +136,10 @@ case $1 in fi ;; status) - $ovs_ctl status && daemon_status ovs-xapi-sync + ovs_ctl status && daemon_status ovs-xapi-sync ;; version) - $ovs_ctl version + ovs_ctl version ;; force-reload-kmod) force_reload_kmod