OpenRC | |
Author: | Roy Marples |
Developer: | OpenRC Developers |
Programming Language: | C, Shell |
Operating System: | Linux, FreeBSD, NetBSD |
Size: | ~1.6 MB |
Genre: | Init daemon |
License: | 2-clause BSD license |
OpenRC is a dependency-based init system for Unix-like computer operating systems. It was created by Roy Marples, a NetBSD developer who was also active in the Gentoo project.[1] [2] It became more broadly adopted as an init system outside of Gentoo following the decision by some Linux distributions not to adopt systemd.[3] [4] [5]
OpenRC is the default init system and/or process supervisor for:
OpenRC is an available init system and/or process 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, 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.[8]
Init scripts share similarities with scripts used in sysvinit, but offer several features to simplify their creation. Scripts are assumed to have, and ; and the system uses variables already declared to create the default functions.[9] The depend function is used to declare dependencies to other services that would be done with LSB 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 . This can replace Gentoo Linux's default init system, sysvinit.[10]
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, including runit[11] and s6.[12]