Gentoo Archives: gentoo-server

From: Andrea Carpani <ml@×××××××.net>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] initng and runscript
Date: Fri, 16 Dec 2005 10:42:46
Message-Id: 1134729664.30909.20.camel@cronos.criticalpath.it
In Reply to: Re: [gentoo-server] initng and runscript by Kalin KOZHUHAROV
1 Il giorno ven, 16-12-2005 alle 01:22 +0900, Kalin KOZHUHAROV ha scritto:
2
3 > > >I'm looking around for alternatives to runscript style init scripts as I
4 > > >don't like very much default gentoo scripts. While I do like the
5 > > >depencencies stuff I still don't get why a "status" on a script gives
6 > > >"started" if the process died badly, or why I need to manually do a zap
7 > > >(can't restart do it for me?).
8 > > The init-scripts only save state and don't check if the service is doing what it is supposed to do.
9 > Yes, and that is by design.
10
11 I know. I miss, though, the possibility to create my own "status"
12 function that at least lets me know if the process is there. I haven't
13 been able to override the "status" cleanly.
14
15 > >>I think status should be implemented in each init script and should give
16 > >>the real status of the service be it a ps|grep or whatever.
17 > > That would make init-scripts much more complicated and buggy I think.
18 > > While that would be optimal I don't see it happening in the near future.
19 > > Also it is really hard to reliably detect a service in a "working"
20 > > state, so you'd only check "does any process named sshd run?" which is
21 > > also mildly buggy :-) etc. etc.
22 > > It's not as easy as it sounds.
23
24 What I was thinking was something like other init systems do: each
25 script can have a "status" overridden at init.d script level that can do
26 checks: wether this is a single ps|grep or something more complex it's a
27 packager's choice.
28
29 > >>One more thing I'd like to see is a init controlled check on the death
30 > >>of some daemons (sort of what daemontools does).
31 > Yes, use daemontools :-)
32
33 I'll give it a shot asap.
34
35 > >>This is why I'm asking: has anyone here seriously tested/used initng new
36 > >>scripts?
37 > > There are many different monitoring tools ... but none of them are easy
38 > > to integrate into baselayout.
39 > What else is there apart form daemontools, I know of any other..
40
41 There are initng scripts found here.
42 http://initng.thinktux.net/index.php/Main_Page
43 Maybe someone has tested them?
44
45 --
46 Andrea Carpani <ml@×××××××.net>
47
48 --
49 gentoo-server@g.o mailing list