X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=debian%2Fopenvswitch-switch.init;h=301bc73d2264fc5535b3dec1614f77c626161199;hb=0135dc8b4e91886b0e9f5c3e1c3e973d9ee575c7;hp=f650f8731cde080a01e6ad78ae8f56b7924eddd3;hpb=c50c79431efa7b85688fb4be61d97c5ee7a9c459;p=openvswitch diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init index f650f873..301bc73d 100755 --- a/debian/openvswitch-switch.init +++ b/debian/openvswitch-switch.init @@ -78,6 +78,17 @@ 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 @@ -89,8 +100,8 @@ case $1 in # The OVS daemons keep up-to-date. ;; restart) - stop - start + shift + restart "$@" ;; status) ovs_ctl status