Runit

runit is an init replacement with service monitoring. It can be used in conjunction with OpenRC as an alternative to sysvinit.

Post-Install Configuration
Runit can be used as the system init. To do this, simply add init=/sbin/runit-init to your bootloader's command line and reboot. You can leave sysvinit installed and go back to it at any time by reverting the change.

Out of the box, runit-init has a very minimal configuration which will only get you to a console login. Although it would be optimal to have all your daemons started up in a single consistent way, you're free to mix and match between runit and OpenRC as you like. Your initscripts can be found in the "default" runlevel, which can be started automatically on boot with the existing "local" service:

If you prefer to do it manually:

Init Stage 3
Stage should take care of system halt and reboot. See Runit for a OpenRC friendly implementation.

SysVinit Reboot and Shutdown Compatibility Service
Runit isn't directly compatible with sysvinit's "telinit", "halt", "poweroff", "reboot" and "shutdown" commands, however many programs (e.g. desktop environments) expect to be able to call some of these. It's possible to emulate the interface they need with a simple script.

If all else fails, use runit-init 0 to shut down or runit-init 6 to reboot.

As a system service
Runit can supervise processes without running as init, or even necessarily as root:

OpenRC can start this for you using /etc/init.d/local (see /etc/local.d/README for more details):

Process Supervision
Like Daemontools, Daemontools-encore or S6 for that matter, Runit can be used to supervise long lived processes, or rather daemons to be precise, be it used as PID 1 or not. This usage will ensure process management easy with sv utility if need be. Daemons would be restarted automatically if necessary after a crash or by an accidental signal mis-usage. So, keeping a few processes,&mdash;like SSH daemon,&mdash;alive becomes an easy task. Just keep in mind that taking care of stage 1, 2 and 3 (system initialisation, normal functional state and system halt respectively) should be considered seriously when using runit-init as PID 1. This is especially easy when using OpenRC power and flexibility for such an easy&mdash;in this case&mdash;task. See the following sub-section for more info on usable implementaion or the forums thread for a variation of it.

This latter use case,&mdash;bypassing SysVinit init,&mdash;and its treatment is extatly similar to what should be done whith S6.

OpenRC friendly setup
A supervision scripts framework inspired by the original supervision-scripts, see, by Avery Payne is available. This framework aims to get a KISS supervision suite which work out of the box with an almost empty service directory and log directory: a symlink of sv/SERVICE/run to sv/.opt/run and sv/SERVICE/log/run to sv/.opt/run-log would be enough for most cases. Similarly, getty,--be it agetty, mingetty or fgetty (the latter would require either an edit of the default configuration, or adding a sv/SERVICE/OPTIONS configuration file)--work out of the box.

All in all, easy and no environment variable (file) x local (sv/SERVICE/env) & global (sv/.env) environment directory x (number of) services useless disk seeks! A single OPTIONS configuration file for each service is prefered here--with a default (sv/.opt/SVC_OPTIONS) file.

And a Runit bundled directory with functional stage 1, 2 and 3 along with ctrlaltdel written with OpenRC in mind is available as well, notwithstanding the compatibilty mode offered by setting RC_OPTS=Yes in OPTIONS configuration file!

Tired to re-write the same (./run) thing over and over again?! Check this out! Do not want to wear out the (system boot) disk for no good reason?! Try it out!

External Resources

 * Arch Linux Wiki
 * Gentoo Forums
 * supervision-scripts: a large, modular collection of scripts that can be used with runit.