inittab

Oliver Grawert ogra at ubuntu.com
Sat Jul 4 09:15:53 UTC 2009


hi,
On Fr, 2009-07-03 at 14:55 -0700, Sundar Nagarajan wrote:

> the user (even one of the 'masses') later installs a package that 
> includes a daemon that accesses the network on startup, that daemon will 
> not find the network up when it starts up during the init sequence, 
> because network-manager has not run yet. And this is something that 
> cannot be FIXED, 
the same would be true if you had defined a wired network but no network
cable would be plugged in making a daemon depending on assumptions (this
init script was run before i attempt to start is generally a bad
idea) ...

... and this is exactly where upstart comes into play ;)

upstart is an event driven init system, it starts services depending on
other services so your daemon will wait until all prerequisites are
fulfilled (no matter if these are in hardware or software) before even
attempting to start. an example event.d file for that above daemon would
look roughly like:

start on started default-route

stop on stopping default-route

so your daemon that is not working without network being up would only
start if definately a default route is there (which means yur wlan is
up, authentication succeeded and your dhcp server handed out an ip ...
or your wire is plugged in and your static route points to a reachable
default gateway). [1] has a good article from 2006 (back when sysvinit
was replaced by upstart in ubuntu) even though a lot changed in upstart
design since then, most of it is still true (just looks different
nowadays).

note that upstart up to jaunty (9.04) was still running in sysvinit
compatibility mode, this is about to change in 9.10 hand in hand with
debian who plan to move to upstart as default bootsystem well [2]

ciao
	oli

[1] http://www.linux.com/archive/articles/57213
[2] https://lists.ubuntu.com/archives/ubuntu-devel/2009-June/028453.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090704/9bc269c3/attachment.sig>


More information about the ubuntu-users mailing list