diff options
Diffstat (limited to 'rc.d')
-rw-r--r-- | rc.d/init.d/functions | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 2000d4af..d36310b4 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -153,6 +153,7 @@ __pids_var_run() { if [ -f "$pid_file" ] ; then local line p + [ ! -r "$pid_file" ] && return 4 # "user had insufficient privilege" while : ; do read line [ -z "$line" ] && break @@ -294,8 +295,13 @@ killproc() { # Find pid. __pids_var_run "$1" "$pid_file" - if [ -z "$pid_file" -a -z "$pid" ]; then - pid="$(__pids_pidof "$1")" + RC=$? + if [ -z "$pid" ]; then + if [ -z "$pid_file" ]; then + pid="$(__pids_pidof "$1")" + else + [ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;} + fi fi # Kill it. |