From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1E7ZZ3-00032K-Bl for garchives@archives.gentoo.org; Tue, 23 Aug 2005 14:15:45 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7NEDcV6029204; Tue, 23 Aug 2005 14:13:38 GMT Received: from callisto.cs.kun.nl (callisto.cs.kun.nl [131.174.33.75]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7NEAe36029022 for ; Tue, 23 Aug 2005 14:10:40 GMT Received: from localhost (localhost [127.0.0.1]) by callisto.cs.kun.nl (Postfix) with ESMTP id 763B12E821A for ; Tue, 23 Aug 2005 16:09:55 +0200 (CEST) From: Paul de Vrieze To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] init script guidelines Date: Tue, 23 Aug 2005 16:09:52 +0200 User-Agent: KMail/1.8.1 References: <16CC9569DA3E4D41A1D4BC25D7B5A16A473A7C@hercules.magbank.com> <1121796031.10337.6.camel@uberpc.ubernet> In-Reply-To: <1121796031.10337.6.camel@uberpc.ubernet> X-Face: #Lb+'V@sGJ;ptgo5}V"W+5OCoo{LZv;bh,s,`WKLi/J)ed1_$0;6X<=?utf-8?q?700LVV/=3BLqPhiDP=5E=0A=09=27f=5Dfnv?=@%6M8\'HR1t=aFx;ePfp{ZQoBe+e)JOQ8T5*(_;mHY+cltLGq<;@$Y,=?utf-8?q?O=5C=24=0A=09Tm=23G6M?=,g![Q62J{na*S9d;R[^8pc%u\aiLqU@`kJtYl"^6pxdW Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1887688.TayK24FNp3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508231609.52681.pauldv@gentoo.org> X-Archives-Salt: 979deb13-811b-4dba-92d2-992a1a3a172b X-Archives-Hash: fdb2f4620a8e1b676ab258461a0425ab --nextPart1887688.TayK24FNp3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 initscripts can check whether the services they are responsible for are=20 still running and then adjust their status accordingly, along with some=20 nice output. This would then allow the execution of rc-status to give=20 proper information of actually running daemons, and the "rc" command the=20 possibility to actually bring online all daemons that should be running. Paul =2D-=20 Paul de Vrieze Gentoo Developer Mail: pauldv@gentoo.org Homepage: http://www.devrieze.net --nextPart1887688.TayK24FNp3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDCy4wbKx5DBjWFdsRAg2nAKCUxgyKH/WY1rznI3+FR3umK7f9VgCg5qU1 dGZPzhO8f7e3g71CjH7ywCE= =tryY -----END PGP SIGNATURE----- --nextPart1887688.TayK24FNp3-- -- gentoo-dev@gentoo.org mailing list