OpenRC
   HOME

TheInfoList



OR:

OpenRC is a dependency-based
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
system for
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
computer
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s. It was created by Roy Marples, a
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
developer who was also active in the Gentoo project. It became more broadly adopted as an init system outside of Gentoo following the decision by some
Linux distribution A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one ...
s not to adopt systemd.


Adoption

OpenRC is the default
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
system and/or process supervisor for: *
Alpine Linux Alpine Linux is a Linux distribution designed to be small, simple and secure. Alpine Linux uses musl, BusyBox and OpenRC instead of the more commonly used glibc, GNU Core Utilities and systemd respectively.
* Funtoo *
Gentoo Linux Gentoo Linux (pronounced ) is a Linux distribution built using the Portage package management system. Unlike a binary software distribution, the source code is compiled locally according to the user's preferences and is often optimized for the ...
* Hyperbola GNU/Linux-libre *
Maemo Leste Maemo is a software platform originally developed by Nokia, now developed by the community, for smartphones and Internet tablets. The platform comprises both the Maemo operating system and SDK. Maemo played a key role in Nokia's strategy to com ...
* Nitrux OpenRC is an available
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
system and/or process supervisor for: *
Artix Linux Artix Linux (or simply Artix ) is a rolling-release distribution based on Arch Linux that uses inits such as OpenRC, runit, s6, or Dinit, as opposed to Arch Linux's init systemd. Artix Linux has its own package repositories but, as a pacman ...
*
Devuan Devuan is a fork of the Debian Linux distribution that uses sysvinit, runit or OpenRC instead of systemd. Devuan aims to avoid "lock-in" by projects like systemd and aims to maintain compatibility with other init systems to avoid detaching ...
*
Parabola GNU/Linux-libre Parabola GNU/Linux-libre is an operating system for the i686, x86-64 and ARMv7 architectures. It is based on many of the packages from Arch Linux and Arch Linux ARM, but distinguishes from the former by offering only free software. It includes th ...
*
Arch Linux Arch Linux () is an independently developed, x86-64 general-purpose Linux distribution that strives to provide the latest stable versions of most software by following a Rolling release, rolling-release model. The default installation is a minim ...


Design

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. 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. 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 . Several other inits are supported, including sysvinit and
Busybox BusyBox is a software suite that provides several Unix utilities in a single executable file. It runs in a variety of POSIX environments such as Linux, Android, and FreeBSD, although many of the tools it provides are designed to work with in ...
. 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 runit is an init and service management scheme for Unix-like operating systems that initializes, supervises, and ends processes throughout the operating system. Runit is a reimplementation of the daemontools process supervision toolkit that r ...
and s6.


Features

* Portable between
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
,
FreeBSD FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
, and
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
* Parallel service startup (off by default) * Dependency-based boot-up * Process segregation through
cgroups cgroups (abbreviated from control groups) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes. Engineers at Google started the work on this ...
* Per-service resource limits (ulimit) * Separation of code and configuration (init.d / conf.d) * Extensible startup scripts * Stateful init scripts (''is it started already?'') * Complex init scripts to start multiple components (
Samba Samba (), also known as samba urbano carioca (''urban Carioca samba'') or simply samba carioca (''Carioca samba''), is a Brazilian music genre that originated in the Afro-Brazilian communities of Rio de Janeiro in the early 20th century. Havin ...
mbd and nmbd MBD or MBd may refer to: * Man bites dog (journalism), a shortened version of an aphorism in journalism * Maxwell–Boltzmann distribution, a probability distribution in physics and chemistry *Megabaud (MBd), equal to one million baud, symbol rate ...
NFS fsd, portmap, etc. * Automatic dependency calculation and service ordering * Modular architecture and separation of optional components ( cron,
syslog In computing, syslog is a standard for message logging. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, i ...
) * Expressive and flexible network handling (including
VPN A virtual private network (VPN) extends a private network across a public network and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network. The be ...
, bridges, etc.) * Verbose debug mode


References

{{Service management in Unix Software using the BSD license Unix process- and task-management-related software