debian: Use DODTIME instead of DIETIME in init scripts
authorJustin Pettit <jpettit@nicira.com>
Thu, 23 Sep 2010 20:37:58 +0000 (13:37 -0700)
committerJustin Pettit <jpettit@nicira.com>
Fri, 24 Sep 2010 01:21:31 +0000 (18:21 -0700)
Brad pointed out that openvswitch-ipsec init script defined the variable
DIETIME but attempted to use it as DODTIME.  This commit uses DODTIME,
since it's the name used by the openvswitch-switch init script.  The
openvswitch-controller init script had the same issue.

As suggested by Ben, the "s" suffixes are removed from sleep commands,
since they are a GNU extension.

Reported-by: Brad Hall <brad@nicira.com>
AUTHORS
debian/openvswitch-controller.init
debian/openvswitch-ipsec.init
debian/openvswitch-switch.init

diff --git a/AUTHORS b/AUTHORS
index 8d2aed8..3d9ddd3 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -35,6 +35,7 @@ The following additional people are mentioned in commit logs as having
 provided helpful bug reports or suggestions.
 
 Alexey I. Froloff       raorn@altlinux.org
+Brad Hall               brad@nicira.com
 Brandon Heller          brandonh@stanford.edu
 Bryan Fulton            bryan@nicira.com
 Cedric Hobbs            cedric@nicira.com
index d489869..4781f83 100755 (executable)
@@ -175,10 +175,10 @@ force_stop() {
     if running ; then
         kill -15 $pid
         # Is it really dead?
-        sleep "$DIETIME"s
+        sleep "$DODTIME"
         if running ; then
             kill -9 $pid
-            sleep "$DIETIME"s
+            sleep "$DODTIME"
             if running ; then
                 echo "Cannot kill $NAME (pid=$pid)!"
                 exit 1
@@ -237,7 +237,7 @@ case "$1" in
         log_daemon_msg "Restarting $DESC" "$NAME"
         stop_server
         # Wait some sensible amount, some server need this
-        [ -n "$DIETIME" ] && sleep $DIETIME
+        [ -n "$DODTIME" ] && sleep $DODTIME
         start_server
         running
         log_end_msg $?
index f3c9a13..5f42406 100755 (executable)
@@ -91,10 +91,10 @@ force_stop() {
     if running ; then
         kill -15 $pid
         # Is it really dead?
-        sleep "$DIETIME"s
+        sleep "$DODTIME"
         if running ; then
             kill -9 $pid
-            sleep "$DIETIME"s
+            sleep "$DODTIME"
             if running ; then
                 echo "Cannot kill $NAME (pid=$pid)!"
                 exit 1
@@ -153,7 +153,7 @@ case "$1" in
         log_daemon_msg "Restarting $NAME"
         stop_server
         # Wait some sensible amount, some server need this
-        [ -n "$DIETIME" ] && sleep $DIETIME
+        [ -n "$DODTIME" ] && sleep $DODTIME
         start_server
         running
         log_end_msg $?
index 600c185..0907cdf 100755 (executable)
@@ -93,10 +93,10 @@ force_stop() {
     [ ! -f "$pidfile" ] && return
     if running $name; then
         kill $pid
-        [ -n "$DODTIME" ] && sleep "$DODTIME"s
+        [ -n "$DODTIME" ] && sleep "$DODTIME"
         if running $name; then
             kill -KILL $pid
-            [ -n "$DODTIME" ] && sleep "$DODTIME"s
+            [ -n "$DODTIME" ] && sleep "$DODTIME"
             if running $name; then
                 echo "Cannot kill $name (pid=$pid)!"
                 exit 1