[Cialug] Ubuntu's New Init

Todd Walton tdwalton at gmail.com
Sat Mar 31 07:40:32 CDT 2007


James Shoemaker recently mentioned whereami, the network
autoconfiguration utility.  It adjusts network settings based on
events, like coming within range of a wireless network.

http://debiana.net/whereami/

I've been reading today about Ubuntu's new init system, and I swear it
was like deja vu all over again.

https://wiki.ubuntu.com/ReplacementInit

Ubuntu's new init system is very much like whereami, except applied to
the system as a whole.  The idea is to create a complete launcher that
will unify and replace sysvinit, cron, at, inetd, etc.  (No, that last
one was not the /etc filesystem, that was the abbreviation for
etcetera, though some /etc configurations would be affected by this.)

As it currently stands, actions are triggered by simply starting the
init system.  You start your computer, initd starts, initd launches
all sorts of processes.  You get dependency checking and limited
environment/state checking.

This new init system will make launching be "event based".  To be
sure, some launchings will be triggered by the "event" of starting the
computer.  But a modern computer is becoming so much more dynamic and
flexible than computers of the sysvinit era.  These days we have
things like, say, USB drives.  Maybe you want your USB drive mounted
when you connect it, but it's not always connected.  You can't put an
entry in /etc/fstab and have it automount.  The mounter will say "No
such filesystem!" and happily move on, forgetting it forever.  With an
event based system, a USB drive being stuck into the computer would
trigger the mounter to do its job there.  Another situation: you've
unplugged your network cable.  You start up the computer and it
requests DHCP info, and sits... and sits... and sits...  What was that
timeout again?  I don't know how much of an issue this is on Ubuntu,
to tell you the truth, but my Gentoo box was bad about that.  The
network is not there, okay?  Get on with it!  If you had something to
tell the init system when there's a network available and when there's
not, then it wouldn't bother looking for a DHCP server it's obviously
not going to get.  And that's where whereami becomes moot.

This new init system will eventually pay attention to temporal events
as well, replacing cron and at.  'cron' runs commands periodically and
'at' runs commands at certain times.

I really like this.  Problems I see:

1) There are other efforts underway to replace sysvinit.  initng seems
to be getting some rave reviews.  Is there going to be duplication of
effort with no apparent benefit?

2) I really hope Ubuntu's init (or any new init, for that matter)
doesn't get too formalized.  PAM is horrible.  I want to speak in
pseudo- natural language and have the computer understand me.  This is
addressed on the ReplacementInit page.  They plan support for
configurations like "start when default-route is up" and "15 minutes
after startup".  I know that this can be done; do the Ubuntu folks
have the will to see it through?

3) How will this affect dbus and KDE's Solid and others in this
category?  Is there overlap?  Will best practices emerge to determine
which gets used when?  Or are they really different things?

-todd, happy that somebody's doing something


More information about the Cialug mailing list