On Tuesday 19 July 2005 20:00, Roy Marples wrote: > On Tue, 2005-07-19 at 12:42 -0400, Eric Brown wrote: > > The real problem is not that the daemons don't return errors, but > > that our init scripts do not make reasonable attempts to verify > > service startup. If a Gentoo init script claims that a service > > started, it should make an effort to check that the processes are > > actually running shortly after the script is run, even if > > start-stop-daemon says the parent process initialized. Relying on > > the return value of start-stop-daemon is simply insufficient for some > > services. > > I agree. > > Infact, rc-services.sh (/lib/rcscripts/sh) has been totally re-written > for the baselayout-1.12.x branch. It now intercepts calls to > start-stop-daemon and checks if the daemon is still active after a > default time of 0.1 (adjustable) seconds. If not, the we assume the > daemon failed. This solves many existing bugs :) > > Also, we kill any rogue processes and other such checks when a stop > call to start-stop-daemon is made - which is handy for when asterisk > fails to start and leaves mpg123 processes lying around :) > > Check it out when baselayout-1.12.0pre1 hits portage! > > Caveat: - some init scripts abuse start-stop-daemon. One example are > all courier scripts which pass the env program as a daemon. This is > easily worked around, but we fail badly if env then calls a shell > script which in turn launches a daemon. Of all the server stuff I run, > only couier has this issue - but there may be other programs too. > Basically start-stop-daemon should only call daemons! What I would really like to see in the init system is a way that initscripts can check whether the services they are responsible for are still running and then adjust their status accordingly, along with some nice output. This would then allow the execution of rc-status to give proper information of actually running daemons, and the "rc" command the possibility to actually bring online all daemons that should be running. Paul -- Paul de Vrieze Gentoo Developer Mail: pauldv@gentoo.org Homepage: http://www.devrieze.net