Date: Sun, 10 Jun 2012 01:11:33 -0400 From: Sahil Tandon <sahil@tandon.net> To: Doug Barton <dougb@FreeBSD.org> Cc: freebsd-rc@freebsd.org Subject: Re: RESEND: [sahil@tandon.net: Request for review: mail/postfix-postfwd rc script] Message-ID: <20120610051133.GA1497@magic.hamla.org> In-Reply-To: <4FD42381.5080504@FreeBSD.org> References: <20120609010405.GA295@magic.hamla.org> <4FD38ED0.7070803@FreeBSD.org> <20120610040657.GA1415@magic.hamla.org> <4FD42381.5080504@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120610051133.GA1497>