]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- allow to have more than one line in pidfile
authorPaweł Gołaszewski <blues@pld-linux.org>
Sat, 14 Apr 2007 21:55:47 +0000 (21:55 +0000)
committerPaweł Gołaszewski <blues@pld-linux.org>
Sat, 14 Apr 2007 21:55:47 +0000 (21:55 +0000)
svn-id: @8458

rc.d/init.d/functions

index de435702da2296829575e0e0039f3b7c37929c3f..c7ff4049c3b8c6cb217616bb71c4a4c586c18c6f 100644 (file)
@@ -666,10 +666,9 @@ pidofproc()
                pidfile="/var/run/${pidfile}";
        fi
        if [ -f "${pidfile}" ] ; then
-               typeset line p pid
+               typeset p pid
                pid=
-               read line < "${pidfile}"
-               for p in $line; do
+               for p in $(< "${pidfile}"); do
                        [ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p"
                done
        fi
This page took 0.139064 seconds and 4 git commands to generate.