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>
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
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
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 $?
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
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 $?
[ ! -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