* Jorge Almeida [2007-04-28 13:20:21 +0100]: >What happens if some vital init task fails? Suppose that checking the >root filesystem fails. The system should halt, but how to do it? If the >script ends with "init 0" in case the previous steps fail, then some >changes must be made in /etc/runit, according to the man page of >runit-init. But if the root file system is mounted read-only... This has pretty much nothing to do with runit. For instance, my /etc/runit/1 is: #!/bin/execlineb /bin/export PATH "/sbin:/bin:/usr/sbin:/usr/bin" # run the traditional startup services /bin/foreground { /sbin/rc 1 } # create the stopit and reboot files for runit and chmod them appropriately /bin/foreground { /bin/touch /etc/runit/stopit } /bin/foreground { /bin/touch /etc/runit/reboot } /bin/foreground { /bin/chmod 0 /etc/runit/stopit } /bin/foreground { /bin/chmod 0 /etc/runit/reboot } # remove /sbin/runit.old if it's found; that indicates runit was upgraded /bin/foreground { /bin/if { /usr/bin/test -f /sbin/runit.old } /bin/rm -f /sbin/runit.old } /bin/foreground { /bin/echo } The important thing here is the call to /sbin/rc, which handles all the initial setup, mounting, etc. It's a little too big to paste here, but you can view it here: http://svn.annvix.org/cgi-bin/viewvc.cgi/tools/runit/trunk/init/rc?revision=616&view=markup If something fatal happens, it's up to rc to deal with it. It will halt, reboot, drop to a console, etc. before stage 1 can complete if there are problems. Handling that stuff is pretty much outside the scope of runit itself... runit gives you the power to do things, but it's up to you to handle them gracefully. =) No different than SysVinit really. FWIW, runit-init is installed as /sbin/init here. -- Vincent Danen @ http://linsec.ca/