diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2016-04-11 15:14:31 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2016-04-11 15:18:01 +0200 |
commit | 7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd (patch) | |
tree | 28ace3d57815a3571c5066475edcb8cd65c51a49 | |
parent | 73945c36ba40c0c9a04fd7fb5b2d3dff17858a67 (diff) | |
download | initscripts-7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd.tar initscripts-7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd.tar.gz initscripts-7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd.tar.bz2 initscripts-7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd.tar.xz initscripts-7bcb9d6b7142ea121eb852f12eda62d7b0cb92cd.zip |
functions: fix ignored delay in killproc
-rw-r--r-- | rc.d/init.d/functions | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index a72a8b86..dd91122f 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -115,6 +115,11 @@ __kill_pids_term_kill() { local stat=($(< /proc/self/stat)) local base_stime=${stat[21]} + if [ "$1" = "-d" ]; then + delay=$2 + shift 2 + fi + kill_list=$(__kill_pids_term_kill_checkpids $base_stime $kill_list) [ -z "$kill_list" ] && return 0 @@ -491,7 +496,7 @@ killproc() { if [ -n "$pid" ] ; then [ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base " if [ -z "$killlevel" ] ; then - __kill_pids_term_kill $pid + __kill_pids_term_kill -d $delay $pid RC=$? [ "$RC" -eq 0 ] && success $"$base shutdown" || failure $"$base shutdown" # use specified level only |