This is an old revision of the document!
Table of Contents
OpenRC
OpenRC is a dependency based init system that works with the system provided init program, normally /sbin/init (which is svsvinit in Slackware). It is not a replacement for /sbin/init.
Features
OpenRC provides a number of features touted as innovative by recent init systems like systemd or upstart, such as hardware initiated initscript run or cgroups support, without requiring large layout changes to accommodate radically different designs and dependencies.
Installation
Two Slackbuilds are available, openrc which contains the OpenRC init system, and openrc-services, which contains various services for use with OpenRC.
Pre installation
The /etc/init.d directory would need to be moved out:
# mv /etc/init.d /etc/init.d.bak
Post installation
After installing, /etc/inittab would need to be replaced. The old one can be backed up
# cp /etc/inittab /etc/inittab.sysvinit # mv /etc/inittab.new /etc/inittab
On reboot
After installing openrc and openrc-services, on rebooting one is booted to a command line with only the bare minimum of services enabled.
Some common services that could be enabled:
# rc-update add udev default # rc-update add dbus default # rc-update add sysklogd default # rc-update add dcron default # rc-update add alsasound default # rc-update add consolekit default
Enabled services can be queried with:
$ rc-status
All services present can be queried with:
# rc-update -v
Configuration
The main configuration file for OpenRC is /etc/rc.conf, and contains various options.
A common option that could be changed is to enable boot logging by setting rc_logger=“YES”.
OpenRC services are present in the /etc/init.d folder, and corresponding configuration files are present in /etc/conf.d
Some common configuration files include:
/etc/conf.d/modules # modules to be loaded at boot /etc/conf.d/hostname # hostname of the system /etc/conf.d/keymaps # console keymap
To boot to a graphical display manager, /etc/conf.d/xdm can be edited to specify the display manager, and the xdm service could be enabled:
# rc-update add xdm default
Services
Services can be started/stopped/restarted as:
# rc-service <service> <action>
For example,
# rc-service sshd start
Services can be enabled as:
# rc-service add <service> <runlevel>
For example,
# rc-service add sshd default
They can be disabled as:
# rc-service del <service> <runlevel>
Troubleshooting
At the moment only a subset of the included services have been tested, so some of them may not run correctly.
Some of the tested services which do not run correctly include mysqld and httpd. For these the system provided services in /etc/rc.d could be used.
See Also
Sources
* Originally written by Aaditya