diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2012-10-24 13:02:22 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2012-10-24 16:43:38 -0700 |
commit | aad12c5f8f6a15681c525d552bd76afd46a1c08b (patch) | |
tree | 55103e5c05eb12866a56c88edd6bb77c70d9134b /rhel | |
parent | 03d589afc85bd3a7bb29c10bcd366835b1253e97 (diff) |
xenserver, rhel, debian: Use ovs-ctl restart.
ovs-ctl has a new command called "restart" which
saves and restores the openflow flows on bridges.
Use that command from the init scripts when doing
a "restart --save-flows=yes".
Also, the debian package postinst script can
set the variable OVS_RESTART_SAVE_FLOWS to "yes"
to ask for save and restore of flows.
Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Diffstat (limited to 'rhel')
-rwxr-xr-x | rhel/etc_init.d_openvswitch | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch index ad7579cd..af332c0b 100755 --- a/rhel/etc_init.d_openvswitch +++ b/rhel/etc_init.d_openvswitch @@ -61,6 +61,15 @@ stop () { rm -f /var/lock/subsys/openvswitch } +restart () { + if [ "$1" = "--save-flows=yes" ]; then + start restart + else + stop + start + fi +} + ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl case $1 in start) @@ -70,8 +79,8 @@ case $1 in stop ;; restart) - stop - start + shift + restart "$@" ;; reload|force-reload) # Nothing to do. |