upstart – emit – start on network

I have been reading some of the funky things in ubuntu implementations that has been happening in the distribution. One of the things that I like is the upstart, this changes the way that init (the process of the computer system from boot to console/GUI for creating the different runlevels ).

In essence, it replaces the /sys/init daemon which handles the start up and shutting down, looking after tasks/services during boot/running and shutdown.

One of the things that is great is that the upstart will “emit” and signal to other services to “start on” when that signal has been emitted, to demonstrate this when a network card is activated for the Ethernet (for example) in the “/etc/network/if-up.d/upstart”

initctl emit -n net-device-up \

which basically says when a network device because in a state of up emit a signal, the state of being up is when the device is active. Then in the /etc/init/mountall-net.conf file

description     "Mount network filesystems"
start on net-device-up

is listening for the emitted signal of net-device-up and thus the upstart will start the networking filesystems.

Another example is within the /etc/init/mountall.conf there is the emitting of a signal

mountall.conf:emits virtual-filesystems

the signal is virtual-filesystems which is then picked up with the udev.conf with the

start on virtual-filesystems

since udev is a virtual filesystem in the /dev and /sys directories.

I find the stuff that Canonical is doing with the ubuntu linux distribution is just great.