This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "OpenRC" – news ·newspapers ·books ·scholar ·JSTOR(July 2019) (Learn how and when to remove this message) |
| OpenRC | |
|---|---|
![]() The OpenRC logo | |
| Original author | Roy Marples |
| Developer | OpenRC Developers |
| Initial release | 5 April 2007; 18 years ago (2007-04-05) |
| Stable release | 0.63[1] |
| Written in | C,[2]sh |
| Operating system | Linux,FreeBSD,NetBSD |
| Size | ~1.6MB |
| Type | Init daemon |
| License | 2-clause BSD license |
| Website | wiki |
| Repository | |
OpenRC is a dependency-basedinit system forUnix-like computeroperating systems. It was created by Roy Marples, aNetBSD developer who was also active in theGentoo project.[3][4]

OpenRC is the defaultinit system orprocess supervisor for:
OpenRC is available as aninit system orprocess supervisor for:
OpenRC is made up of several modular components, the main ones being an init (optional), the core dependency management system, and a daemon supervisor (optional). It is written in C and POSIX-compliant shell,[2] making it usable on BSD and Linux systems.
The core part of OpenRC handles dependency management and init script parsing. OpenRC works by scanning the runlevels, building a dependency graph, then starting the needed service scripts. It exits once the scripts have been started. By default, OpenRC uses a modified version of start-stop-daemon for daemon management.[10]
Init scripts share similarities with scripts used insysvinit, but offer several features to simplify their creation. Scripts are assumed to havestart(),stop() andstatus(); and the system uses variables already declared to create the default functions.[11] The depend function is used to declare dependencies to other services that would be done withLSB headers in sysvinit. Configuration and mechanism are separated with configuration files in the conf.d directory and init files in the init.d directory.
openrc-init first appeared in version 0.25 as an optional replacement for/sbin/init. This can replace Gentoo Linux's default init system, sysvinit.[12]
Supervise-daemon first appeared in version 0.21 giving OpenRC supervision capabilities. It can be enabled in the init script for supervise-daemon to start and monitor a daemon. Several other daemon supervisors are supported, includingrunit[13] ands6.[14]