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 direc ...
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 daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
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 ava ...
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 systemd is a software suite that provides an array of system components for Linux operating systems. Its main aim is to unify service configuration and behavior across Linux distributions; Its primary component is a "system and service manag ...
.


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 direc ...
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 th ...
*
Hyperbola GNU/Linux-libre Hyperbola GNU/Linux-libre is a Linux distribution for the i686 and x86-64 architectures. It is based on Arch Linux snapshots and Debian development. It includes the GNU operating system components and the Linux-libre kernel instead of the gener ...
*
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 co ...
* 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 direc ...
system and/or process supervisor for: * Artix Linux *
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 *
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 model. The default installation is a minimal base system, ...


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 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 ...
, 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 inte ...
. 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 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, whi ...
,
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 ava ...
* Parallel service startup (off by default) * Dependency-based boot-up * Process segregation through cgroups * 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. Havi ...
mbd and nmbd NFS fsd, portmap, etc. * Automatic dependency calculation and service ordering * Modular architecture and separation of optional components (
cron The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts), also known as cron jobs, to run periodically at fixed t ...
,
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, bridges, etc.) * Verbose debug mode


References

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