[Exherbo-dev] New initsystem

Bryan Østergaard bryan.ostergaard at gmail.com
Wed Feb 13 19:58:11 GMT 2008


On Feb 11, 2008 10:27 PM, Mike Kelly <pioto at pioto.org> wrote:
> On Mon, 11 Feb 2008 20:44:21 +0100
> "Bryan Østergaard" <bryan.ostergaard at gmail.com> wrote:
>
> > My current plan is to:
>
> One thing mentioned on IRC last night when we were talking about this
> subject is that, for some things, it's hard to determine what sane
> dependencies are. For example, on Gentoo, net.eth0 depends on
> localmount. But what if our / is on NFS or something like that? It
> might be best to handle that sort of case with some early userspace
> scripts, but we might need to allow for some less traditional
> event/dependency ideas to properly handle this. I think Ciaran brought
> this point up.
Dependencies is one of the things that's going to require quite a bit
of work I guess. Gentoos dependency system works fairly well for most
things but we probably want a more flexible system to handle various
edge cases.

> Another thing I noticed while messing around with Upstart this weekend
> is that, for some things, its way of handling daemons seems nice.
> However, it can't deal with daemons that want to fork() off
> immediately (the daemon and pid stanzas that seem to be designed for
> this don't work). But, the general idea of having it monitor the daemon
> and being able to restart it as needed would be nice to have. Gentoo
> can't really do that.
Some initsystems goes a bit beyond just restarting crashed services
and also try to restart or kill them on excessive resource usage
(probably limited to memory or cpu usage). One idea would be to let
the user / admin configure on a per-service level which conditions
services should be restarted or killed on. I have yet to decide
whether this is something I want or we should just hardcode restart on
crashes.

> The idea of any of several services "providing" a service is another
> thing to think about. Gentoo tries to do this with things like net (but
> doesn't really get it right in the case where I have a PCMCIA card).
> We'd want to do this better.
Absolutely - I assume that we'll need to tweak quite a few things
compared to Gentoo even if we base our design roughly on the Gentoo
initscript system.

> Another upstart shortcoming is that you can't really disable a job w/o
> removing it from /etc/event.d. Gentoo's rc-update does a pretty decent
> job of this sort of thing within the limits of that system, but we
> would want to make our event-driven system able to have things disabled
> by the user if desired.
I want to do away with runlevels completely so we need another way to
configure initscripts that should be started on bootup.

> Ohh... and being able to trigger certain services based upon which
> network we are connected to would be cool. (e.g. only start zephyr
> while I'm on campus, but not at home)
Maybe we want some user scriptable way to determine whether to start
initscripts? Detecting which network you're connected would be fairly
complicated to do in a standard way without being able to provide
local scripts I guess. We need to make sure this doesn't complicate
things unneccessarily though. I'm not sure this is a good idea yet so
I'd be quite interested in hearing about alternative solutions.

Regards,
Bryan Østergaard


More information about the Exherbo-dev mailing list