From: Justin Pettit <jpettit@nicira.com>
Date: Thu, 23 Sep 2010 20:37:58 +0000 (-0700)
Subject: debian: Use DODTIME instead of DIETIME in init scripts
X-Git-Tag: v1.1.0~1077
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9704460403a02554595b5a7ed17914a0b0357cac;p=sliver-openvswitch.git

debian: Use DODTIME instead of DIETIME in init scripts

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>
---

diff --git a/AUTHORS b/AUTHORS
index 8d2aed834..3d9ddd336 100644
--- 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
diff --git a/debian/openvswitch-controller.init b/debian/openvswitch-controller.init
index d489869ed..4781f83f2 100755
--- a/debian/openvswitch-controller.init
+++ b/debian/openvswitch-controller.init
@@ -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 $?
diff --git a/debian/openvswitch-ipsec.init b/debian/openvswitch-ipsec.init
index f3c9a13a0..5f4240672 100755
--- a/debian/openvswitch-ipsec.init
+++ b/debian/openvswitch-ipsec.init
@@ -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 $?
diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index 600c18564..0907cdf7c 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -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