rc-scripts/trunk/rc.d/init.d/functions
arekm
cvs at pld-linux.org
Mon Sep 5 19:12:12 CEST 2005
Author: arekm
Date: Mon Sep 5 19:12:09 2005
New Revision: 6352
Modified:
rc-scripts/trunk/rc.d/init.d/functions
Log:
Add support for whole path in pidfile.
Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions (original)
+++ rc-scripts/trunk/rc.d/init.d/functions Mon Sep 5 19:12:09 2005
@@ -656,10 +656,15 @@
fi
# First try pidfile or "/var/run/*.pid"
- if [ -f /var/run/${pidfile} ] ; then
+ if (echo "${pidfile}" | grep -Eq "^/"); then
+ pidfile="${pidfile}"
+ else
+ pidfile="/var/run/${pidfile}";
+ fi
+ if [ -f "${pidfile}" ] ; then
typeset line p pid
pid=
- read line < /var/run/${pidfile}
+ read line < "${pidfile}"
for p in $line; do
[ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p"
done
More information about the pld-cvs-commit
mailing list