xenserver: Don't require confirmation to restart vswitch.
authorBen Pfaff <blp@nicira.com>
Fri, 10 Jun 2011 20:10:28 +0000 (13:10 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Jun 2011 19:28:06 +0000 (12:28 -0700)
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>
xenserver/etc_init.d_openvswitch

index bd64cc701a47e840230cdab8046d7b17fb6711d2..6917fba85dca17c19f2297a182ec10ea0d649253 100755 (executable)
@@ -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