On Sat, Feb 18, 2012 at 10:53:10AM -0500, Jiri B wrote: > On Fri, Feb 17, 2012 at 07:47:32AM +0100, Antoine Jacoutot wrote: > > On Thu, Feb 16, 2012 at 06:47:05PM -0500, Jiri B wrote: > > > On Sat, Feb 04, 2012 at 09:27:53PM +0000, Stuart Henderson wrote: > > > > as to the rc.d thing; the daemon *does* start and is running when > > > > rc_check examines it, but exits afterwards. > > > > > > # cat -n /etc/rc.d/rc.subr | sed -n '117,129p' > > > 117 while true; do # no real loop, only needed to > > > break > > > 118 if type rc_pre >/dev/null; then > > > 119 rc_do rc_pre || break > > > 120 fi > > > 121 # XXX only checks the status of the > > > return code, > > > 122 # and _not_ that the daemon is actually > > > running > > > 123 rc_do rc_start || break > > > 124 if [ -n "${_bg}" ]; then > > > 125 sleep 1 > > > 126 rc_do rc_wait start || break > > > 127 fi > > > 128 rc_do rc_write_runfile > > > 129 rc_exit ok > > > > > > Not true, there's no rc_check at all. Any idea what's the logic behind? > > > > > > Reporting 'ok' has no real sense. I understand that my own problem was > > > configuration, true, but having no check and just echoing 'ok' is strange > > > to me. > > > > It is impossible to report whether start was OK in a _timely_ fashion and > > without false positive. > > Some daemons can run for like 20 or 30 seconds spawning stuffs, making > > checks... then exiting because there is in fact a problem. > > See comments line 121 and 122. "ok" means the daemon was started and return > > code was ok. > > Well, I still think it would be worth to add rc_check after rc_start, even I > understand > your argument about false positive.
This has been discussed in the past already and we will not add it. This could potentially delay the startup bu a _big_ amount of time. -- Antoine