bsdperimeter/pfsense-packages — pull request #348 by phil-davis (2013-01-07 12:55:45+00:00)
Title: Improve cron stop checks

Having an OCD day - cleaning up "noise" output on the console!
If cron.pid did not exist, an error was emitted - that could happen when a stop is done at package install, before it was ever started. If cron is stopped, cron.pid was left behind. Another attempt to stop emits an error about the pid in cron.pid not existing.
This extra checking avoids any error messages if stop is called before start, or stop is called twice.

Prior to this change, here is some sample console output during cron package reinstall after firmware upgrade:
...
Backing up libraries...
Removing package...
Removing Cron components...
Configuration... done.
Cleaning up... done.
Beginning package installation for Cron . 100%
Installing Cron and its dependencies. 100% 100% 100% 100%cat: /var/run/cron.pid: No such file or directory
usage: kill [-s signal_name] pid ...
kill -l [exit_status]
kill -signal_name pid ...
kill -signal_number pid ...
...