diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-06-10 13:10:28 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-06-16 12:28:06 -0700 |
| commit | 18547b9ebc685c90274471aa938018a47af1499e (patch) | |
| tree | 048d89ae5bf477d626748d960b3fe722c2cae4b9 /xenserver/etc_init.d_openvswitch | |
| parent | 1e9092831d38457bb5c43a9ce176e418fab3d069 (diff) | |
| download | openvswitch-18547b9ebc685c90274471aa938018a47af1499e.tar.gz | |
xenserver: Don't require confirmation to restart vswitch.
Early development versions of ovs-vswitchd didn't always restart
successfully, so we required confirmation if "restart" was invoked
interactively. Recent versions do just fine, so drop the confirmation
prompt.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'xenserver/etc_init.d_openvswitch')
| -rwxr-xr-x | xenserver/etc_init.d_openvswitch | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index bd64cc701..6917fba85 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -266,31 +266,6 @@ function stop_daemon { fi } -function restart_approval { - if test ! -t 0; then - # Don't prompt if invoked non-interactively. - return 0 - fi - cat <<EOF - -WARNING!!! - -Restarting Open vSwitch on a live server is not guaranteed to work. It is -provided as a convenience for those situations in which it does work. - -EOF - read -s -r -n 1 -p "Continue with restart (y/N): " response - printf "\n" - case "$response" in - y|Y) - return 0 - ;; - *) - return 1 - ;; - esac -} - function set_system_ids { if [ -f /etc/xensource-inventory ]; then OVS_VERSION=`ovs-vswitchd --version | sed 's/.*) //;1q'` @@ -388,13 +363,6 @@ function stop { rm -f /var/lock/subsys/openvswitch } -function restart { - if restart_approval; then - stop - start - fi -} - function internal_interfaces { # Outputs a list of internal interfaces: # @@ -448,7 +416,8 @@ case "$1" in stop ;; restart) - restart + stop + start ;; reload|force-reload) # Nothing to do to ovs-vswitchd and ovsdb-server as they keep their |
