X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=debian%2Fopenvswitch-switch.init;h=301bc73d2264fc5535b3dec1614f77c626161199;hb=d2bcb6bb734f53f2a454ac68441e1753fd58ca48;hp=3c937205599bc00fbcca3195d73b8cbae07ef466;hpb=f4d458c55089f36710e5c2f36b578d76702b2789;p=sliver-openvswitch.git diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index 3c9372055..301bc73d2 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -72,14 +72,23 @@ start () { fi set "$@" $OVS_CTL_OPTS "$@" || exit $? - - ovs_ctl --protocol=gre enable-protocol } stop () { ovs_ctl stop } +restart () { + # OVS_RESTART_SAVE_FLOWS can be set by package postinst script. + if [ "$OVS_RESTART_SAVE_FLOWS" = "yes" ] || \ + [ "$1" = "--save-flows=yes" ]; then + start restart + else + stop + start + fi +} + case $1 in start) start @@ -91,8 +100,8 @@ case $1 in # The OVS daemons keep up-to-date. ;; restart) - stop - start + shift + restart "$@" ;; status) ovs_ctl status