OpenRC

OpenRC is a dependency based init system that works with the system provided init program, normally. It is not a replacement for. OpenRC is 100% compatible with Gentoo init scripts, which means you can probably find one for the daemons you want to start in the Gentoo Portage Tree. OpenRC, however, is not exclusively used by Gentoo Linux and can be used on different Linux and BSD systems.

Features
OpenRC provides a number of features touted as innovative by recent init systems like systemd or upstart, such as hardware initiated initscript run or cgroups support, without requiring large layout changes to accommodate radically different designs and dependencies. See also Comparison of init systems.

OpenRC Busybox Integration
Busybox can be used to replace most of the userspace needed by OpenRC (init, shell, awk and other posix tools), by using a complete busybox as shell for OpenRC all the calls that normally would cause a fork/exec would be spared, improving the overall speed. This process isn't yet streamlined.

Replacing init
The sysvinit inittab provided by Gentoo is not compatible to the busybox init.

In order to set a specific runlevel from the bootloader the variable `softlevel=` should be used.

Busybox specific init.d files
TODO: busybox provides a number of applets that could be used to replace third party software like acpid or dhcp/dhcpcd.

Replacing udev with mdev
See mdev.

Using runlevels
OpenRC can be controlled and configured using rc, rc-update and rc-status.

Named runlevels
OpenRC runlevels are directories living in "/etc/runlevels" to create additional runlevels is enough to issue

Stacked runlevels
Is possible manage variants using rc-update -s

An usage example for using stacked runlevel on laptop to group networking services based on location is at OpenRC/StackedRunlevel

Select specific runlevel at boot
TODO

Prefix usage
Gentoo Prefix installs Gentoo within an offset, known as a prefix, allowing users to install Gentoo in another location in the filesystem hierarchy, hence avoiding conflicts. Next to this offset, Gentoo Prefix runs unprivileged, meaning no root user or rights are required to use it.

By using an offset (the "prefix" location), it is possible for many "alternative" user groups to benefit from a large part of the packages in the Gentoo Linux Portage tree. Currently users of the following systems successfully run Gentoo Prefix: Mac OS X on PPC and x86, Linux on x86, x86_64 and ia64, Solaris 10 on Sparc, Sparc/64, x86 and x86_64, FreeBSD on x86, AIX on PPC, Interix on x86, Windows on x86 (with the help of Interix), HP-UX on PARISC and ia64.

OpenRC runscript already support prefix-installed daemons, during the SummerOfCode2012 work will be done to implement full secondary/session daemon behaviour to complete the overall feature set provided by Prefix.

OpenRC/Prefix, a tutorial for trying it out.

Hotplug usage
OpenRC can be trigger by external events, such as new hardware from udev. See OpenRC/Event_Driven for details.

Other uses

 * stateful init scripts and automatic respawning (run "rc")