Share to: share facebook share twitter share wa share telegram print page

OpenRC

OpenRC
Original author(s)Roy Marples
Developer(s)OpenRC Developers
Initial release5 April 2007; 17 years ago (2007-04-05)
Stable release
0.55.1[1] / 18 September 2024; 3 months ago (18 September 2024)
Repository
Written inC,[2] Shell
Operating systemLinux, FreeBSD, NetBSD
Size~1.6 MB
TypeInit daemon
License2-clause BSD license
Websitewiki.gentoo.org/wiki/Project:OpenRC

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.[3][4] It became more broadly adopted as an init system outside of Gentoo following the decision by some Linux distributions not to adopt systemd.[5][6][7]

OpenRC booting Artix Linux
Booting process

Adoption

OpenRC is the default init system and/or process supervisor for:

OpenRC is an available init system and/or process supervisor for:

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.[10]

Init scripts share similarities with scripts used in sysvinit, but offer several features to simplify their creation. Scripts are assumed to have start(), stop() and status(); 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 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 /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, including runit[13] and s6.[14]

Features

  • Portable between Linux, FreeBSD, and NetBSD
  • Parallel service startup (off by default)
  • Dependency-based boot-up
  • Process segregation through cgroups[15]
  • Per-service resource limits (ulimit)
  • Separation of code and configuration (init.d / conf.d)
  • Extensible startup scripts
  • Stateful init scripts (has it started already?)
  • Complex init scripts to start multiple components (Samba [smbd and nmbd], NFS [nfsd, portmap, etc.])
  • Automatic dependency calculation and service ordering
  • Modular architecture and separation of optional components (cron, syslog)
  • Expressive and flexible network handling (including VPN, bridges, etc.)
  • Verbose debug mode

References

  1. ^ "Release 0.55.1". 18 September 2024. Retrieved 22 September 2024.
  2. ^ "openrc", Analysis Summary, Ohloh, retrieved 2012-03-10
  3. ^ "History". GitHub. Retrieved 6 April 2020.
  4. ^ "Developers". Retrieved 6 April 2020.
  5. ^ "Manjaro OpenRC 0.8.13 - reinventing init without systemd". DistroWatch Weekly, Issue 612. 1 June 2015. Retrieved 2020-04-04.
  6. ^ "5 Differences Between TrueOS & Linux". 23 February 2018. Retrieved 6 April 2020.
  7. ^ "Improving TrueOS: OpenRC". Retrieved 6 April 2020.
  8. ^ "Distro's forum - Which init system is Artix's default?". Retrieved 2023-10-30.
  9. ^ "Devuan ASCII 2.0.0 stable release". Retrieved 2021-01-18.
  10. ^ "user guide". GitHub. Retrieved 6 April 2020.
  11. ^ "service script guide". GitHub. Retrieved 6 April 2020.
  12. ^ "OpenRC/openrc-init". February 6, 2023. Retrieved October 7, 2023.
  13. ^ "runit guide". GitHub. Retrieved 6 April 2020.
  14. ^ "s6 Guide". GitHub. Retrieved 6 April 2020.
  15. ^ "CGroups Support". Retrieved 5 April 2020.
Index: pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve 
Prefix: a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 
Kembali kehalaman sebelumnya