bsdperimeter/pfsense — pull request #309 by phil-davis (2013-01-06 15:29:10+00:00)
Title: Prevent "no such file" message when pid file does not exist

Recent filterdns script changes resulted in the following "noise" on the console at boot:
Syncing OpenVPN settings...done.
Configuring firewall.....pgrep: Cannot open pidfile `/var/run/filterdns.pid': No such file or directory
.done.
Starting PFLOG...done.

I think there are also occasions when other code calls isvalidpid($pidfile), passing a pid file name that might not currently exist.
This change first checks to see if the pidfile actually exists, before passing it to pgrep. That gets rid of the pgrep "error" message.