On Wed, Mar 08, 2006 at 12:38:15PM -0500, Geo Carncross wrote: > On Wed, 2006-03-08 at 11:47 -0500, Matthew T. O'Connor wrote: > > Geo Carncross wrote: > > If init were really such a good answer why haven't all the really smart > > people put distros together use it for more than a few simple processes > > that are designed to exit and be restarted by init. > > That's a really good question. > > Why don't people use it? > > I don't know the answer to that either. > > In the meantime, I've collected this: > > * It's easier to add services to init.d than to inittab- but nobody does > that automatically EXCEPT for the people who don't have to. > > It's weak; it COULD be a good reason- or rather, it COULD supply a > recommendation for how to improve inittab, but I suppose until people > start actively taking advantage of this, I can't see it being a > priority.
Two benefits of init.d are that it makes it easier to stop services and makes it easier to define dependencies between services. Initng combines the best of inittab and init.d. > I've also collected the conjecture: > > If something unexpected happens, it's better to deny services than to > restore service > > I don't know as I can agree with that- My job is to provide service, and > I can find out what the unexpected thing was later. > > If you really believe this though, consider using inittab and the > following: > > #!/bin/sh > [ -f /started.1 ] && exec halt > touch /started.1 > exec my-daemon > > That way the whole system will freeze the instant your daemon crashes. > That should really satisfy that condition. > > Again: something else inittab can do better than init.d I've long held the belief that when a daemon dies, something is wrong, and it should be investigated. Restarting it automatically feels like a bandaid. I'm pretty much won over now, though. On production machines, keeping the service available is almost always much more important than diagnosing the reason for a crashed daemon. Halting on a daemon crash is, of course, the worse of both worlds as it denies service and precludes investigation. xn
