Editing OpenRC
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 141: | Line 141: | ||
'''OpenRC''' has a concept of runlevels, similar to what sysvinit historically offered. A runlevel is basically a collection of services that needs to be started. Instead of random numbers they are named, and users can create their own if needed. This allows, for example, to have a default runlevel with "everything" enabled, and a "powersaving" runlevel where some services are disabled. | '''OpenRC''' has a concept of runlevels, similar to what sysvinit historically offered. A runlevel is basically a collection of services that needs to be started. Instead of random numbers they are named, and users can create their own if needed. This allows, for example, to have a default runlevel with "everything" enabled, and a "powersaving" runlevel where some services are disabled. | ||
− | The ''' | + | The '''rc-status''' helper will print all currently active runlevels and the state of services in them. |
All runlevels are represented as folders in ''/etc/runlevels/'' with symlinks to the actual service scripts.<br/> | All runlevels are represented as folders in ''/etc/runlevels/'' with symlinks to the actual service scripts.<br/> | ||
Line 148: | Line 148: | ||
Calling '''OpenRC''' with an argument (openrc default) will switch to that runlevel; this will start and stop services as needed. | Calling '''OpenRC''' with an argument (openrc default) will switch to that runlevel; this will start and stop services as needed. | ||
− | Managing runlevels is usually done through the ''' | + | Managing runlevels is usually done through the '''rc-update''' helper, but could of course be done by hand if desired. e.g. ''rc-update add nginx default'' - add nginx to the default runlevel '''Note:''' This will not auto-start nginx! You'd still have to trigger rc or run the service script by hand. |
FIXME: Document stacked runlevels | FIXME: Document stacked runlevels | ||
The default startup uses the runlevels ''sysinit'', ''boot'', and ''default'', in that order. Shutdown uses the shutdown runlevel. | The default startup uses the runlevels ''sysinit'', ''boot'', and ''default'', in that order. Shutdown uses the shutdown runlevel. | ||
+ | |||
+ | |||
===The Magic of [[Conf.d|conf.d]]=== | ===The Magic of [[Conf.d|conf.d]]=== |