aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d')
-rw-r--r--rc.d/init.d/functions3
1 files changed, 3 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index d474a620..cfe7f12a 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -148,8 +148,11 @@ __umount_loopback_loop() {
__pids_var_run() {
local base=${1##*/}
local pid_file=${2:-/var/run/$base.pid}
+ local pid_dir=$(/usr/bin/dirname $pid_file > /dev/null)
local binary=$3
+ [ -d "$pid_dir" -a ! -r "$pid_dir" ] && return 4
+
pid=
if [ -f "$pid_file" ] ; then
local line p