From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20798 invoked from network); 5 May 2004 18:07:33 +0000 Received: from smtp.gentoo.org (128.193.0.39) by eagle.gentoo.oregonstate.edu with DES-CBC3-SHA encrypted SMTP; 5 May 2004 18:07:33 +0000 Received: from lists.gentoo.org ([128.193.0.34] helo=eagle.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.24) id 1BLQnt-0004EZ-FM for arch-gentoo-dev@lists.gentoo.org; Wed, 05 May 2004 18:07:33 +0000 Received: (qmail 5991 invoked by uid 50004); 5 May 2004 18:07:33 +0000 Mailing-List: contact gentoo-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Received: (qmail 2317 invoked from network); 5 May 2004 18:07:32 +0000 From: Martin Schlemmer Reply-To: Martin Schlemmer To: Paul de Vrieze Cc: gentoo-dev@lists.gentoo.org In-Reply-To: <200405031105.47155.pauldv@gentoo.org> References: <20040502173223.GA7160@linux1.home> <200405031030.16829.pauldv@gentoo.org> <200405031105.47155.pauldv@gentoo.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Dm7pvUIcZN//Qqw3y2DZ" Message-Id: <1083780663.18004.22.camel@nosferatu.lan> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 05 May 2004 20:11:05 +0200 Subject: Re: [gentoo-dev] strange gentoo shutdown sequence X-Archives-Salt: 3211aac0-b289-4a8a-9aae-7f7e6feb7e95 X-Archives-Hash: 6b15dfc9e3d0e7d6344be88033ac5bbb --=-Dm7pvUIcZN//Qqw3y2DZ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2004-05-03 at 11:05, Paul de Vrieze wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On Monday 03 May 2004 10:50, Allen D Parker wrote: > > We can actually probably do this in bash fairly simply (although > > unless each service is started in sequence or in a seperate > > shellspace, it might be a problem) parallel start + bash variables =3D > > nastiness. > > > > for each initscript SVCNAME=3D"apache2" > > then in the actual runscript, something like this would do just fine > > (imho) for 99% of what would need to be supported: > > > > SVCHOME=3D`whereis ${SVCNAME} | cut -d " " -f 2` > > if ${SVCNAME} !=3D `ps aux | grep ${SVCHOME}`; then > > /etc/init.d/${SVCNAME} zap && > > /etc/init.d/${SVCNAME} start > > else > > SVC_STATUS=3D"alive" > > fi >=20 > I was more thinking of providing an extra function (say "status()") that=20 > would have a positive result if the service is actually running and a=20 > negative result if it is not. The handler script/program should then be=20 > able to handle this function. >=20 There is one that can be overridden. Also have a look at /lib/rcscripts/sh/rc-daemon.sh - yeah, its crude, its very alpha (did it in a night some months back), but it was supposed to be generic daemon handling, with checking of pid, etc. --=20 Martin Schlemmer Gentoo Linux Developer, Desktop/System Team Developer Cape Town, South Africa --=-Dm7pvUIcZN//Qqw3y2DZ Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBAmS43qburzKaJYLYRAuvMAJ49/u5fARdDq7nKVDhrCkvhrIyZfQCfdQYf 2wF2N4ZGKJ6PGdYoqHgN9sk= =GkFG -----END PGP SIGNATURE----- --=-Dm7pvUIcZN//Qqw3y2DZ--