This patch, applied to /lib/lsb/init-functions resolves the problem by:
1> Allowing pid detection to check directly by pid if the process is in fact running.
2> Allowing pid detection to check for stale pid files.
3> Failing over to pidof detection to find the parent pid (ppid) of the process if it is running.
--- init-functions.orig 2010-12-01 09:18:54.219049251 -0500
+++ init-functions 2010-12-01 09:19:29.779059526 -0500
@@ -67,7 +67,7 @@
OPTIND=1
while getopts p: opt ; do
case "$opt" in
- p) pidfile="$OPTARG"; specified=1;;
+ p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
@@ -91,7 +91,7 @@
fi
fi
fi
- if [ -x /bin/pidof -a ! "$specified" ]; then
+ if [ -x /bin/pidof ]; then
status="0"
/bin/pidof -o %PPID -x $1 || status="$?"
if [ "$status" = 1 ]; then
This patch, applied to /lib/lsb/ init-functions resolves the problem by:
1> Allowing pid detection to check directly by pid if the process is in fact running.
2> Allowing pid detection to check for stale pid files.
3> Failing over to pidof detection to find the parent pid (ppid) of the process if it is running.
--- init-functions.orig 2010-12-01 09:18:54.219049251 -0500
+++ init-functions 2010-12-01 09:19:29.779059526 -0500
@@ -67,7 +67,7 @@
OPTIND=1
while getopts p: opt ; do
case "$opt" in
- p) pidfile="$OPTARG"; specified=1;;
+ p) pidfile="$OPTARG";;
esac
done
shift $(($OPTIND - 1))
@@ -91,7 +91,7 @@
fi
fi
fi
- if [ -x /bin/pidof -a ! "$specified" ]; then
+ if [ -x /bin/pidof ]; then
status="0"
/bin/pidof -o %PPID -x $1 || status="$?"
if [ "$status" = 1 ]; then