]> TLD Linux GIT Repositories - rc-scripts.git/commitdiff
- fix bug in pidofproc()
authorMarcin Krol <hawk@tld-linux.org>
Fri, 4 Sep 2015 23:38:17 +0000 (23:38 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Fri, 4 Sep 2015 23:38:17 +0000 (23:38 +0000)
lib/functions

index 41871391e435759b513ffd5e96343c4a0d7bc018..ced6e97caf095d2f2d1d720911aacb94bf24ee69 100644 (file)
@@ -979,6 +979,8 @@ pidofproc() {
                for p in $(< "${pidfile}"); do
                        [ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p"
                done
+       else
+               unset pidfile
        fi
 
        # Next try "pidof" if pidfile is not specified