RESEND: [sahil@tandon.net: Request for review:
mail/postfix-postfwd rc script]
Sahil Tandon
sahil at tandon.net
Sun Jun 10 05:11:37 UTC 2012
On Sat, 2012-06-09 at 21:33:05 -0700, Doug Barton wrote:
> ...
> > One thing I retained is start_precmd, which is needed because of an
> > upstream bug (I've reported it) which causes the program to silently
> > terminate if 'start' is issued when postfwd is already running! Let me
> > know if there is a more suitable way to handle this until it is fixed
> > upstream.
>
> That actually shouldn't happen ...
>
> service named start
> named already running? (pid=843).
That works with the port in your example as well as most others, but not
postfwd.
> If you have pidfile defined properly the check you're using should be
> handled by rc.subr already.
Unless I'm mistaken, we're back to the same core issue that foils the
magic of setting pidfile. From /etc/rc.subr:
| start)
| if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
| echo 1>&2 "${name} already running (pid=$rc_pid)."
| return 1
| fi
And because /etc/rc.subr assumes:
rc_pid=$(check_pidfile $pidfile $command)
or
rc_pid=$(check_process $command)
... rc_pid is unset (because both check_pidfile and check_process are
confused due to the aforementioned issues with ps output); thus, the
start method is unaware that the program is running.
--
Sahil Tandon
More information about the freebsd-rc
mailing list