From 9704460403a02554595b5a7ed17914a0b0357cac Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 23 Sep 2010 13:37:58 -0700 Subject: [PATCH] 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 --- AUTHORS | 1 + debian/openvswitch-controller.init | 6 +++--- debian/openvswitch-ipsec.init | 6 +++--- debian/openvswitch-switch.init | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8d2aed83..3d9ddd33 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 d489869e..4781f83f 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 f3c9a13a..5f424067 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 600c1856..0907cdf7 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 -- 2.30.2