OpenRC: Difference between revisions

From Alpine Linux
(Created page with '= Alpine Linux Init System = Alpine has the following tools for configuring a service to start at boot: * rc_add * rc_delete * rc_status Note that if your system doesn't provide...')
 
(Linked to OpenRC and updated for 2.0)
Line 1: Line 1:
= Alpine Linux Init System =
= Alpine Linux Init System =
Alpine has the following tools for configuring a service to start at boot:
Alpine Linux uses [http://roy.marples.name/projects/openrc OpenRC] for its init system.
* rc_add
* rc_delete
* rc_status


Note that if your system doesn't provide the rc_add, rc_delete, or rc_status utilities, try the following analogous commands:
== Quick-Start Information ==
* rc-update add <service name> <runlevel>
Alpine Linux has the following commands for managing services:
* rc-update del <service name> <runlevel>
* <code>rc-update add service <runlevel></code>
* rc-status
* <code>rc-update del service <runlevel></code>
* <code>rc-status</code>


== Adding a service to start at next boot ==
{{Tip|Prior to Alpine Linux 2.0, you might need to use the following commands instead: ''rc_add, rc_delete, rc_status''.}}
usage: rc_add [-hv] [-s number] script
  -h  Show help and exit.
  -k  Also add a corresponding kill link for shutdown/reboot.
  -s  Set two-digit start number (00-99). Default is 50.
  -S  Add service as a system init service (rcS.d).
  -v  Turn on verbose output.


== Removing a service from starting at next boot ==
== rc-update usage ==
  usage: rc_delete [-hv] [-l level] script...
  Usage: rc-update [options] add service <runlevel>
  -h Show help and exit.
        rc-update [options] del service <runlevel>
  -l  Only remove from specified level. Default is all levels.
        rc-update [options] show
  -v Turn on verbose output.
Options: [suChqv]
  -s, --stack                      Stack a runlevel instead of a service
  -u, --update                      Force an update of the dependency tree
  -h, --help                        Display this help output
  -C, --nocolor                    Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                      Run quietly


== Show status on what services will start at next boot ==
== rc-status usage ==
  usage: rc_status [-hv] [-l level] [script]
  Usage: rc-status [options] [runlevel1] [runlevel2] ...
  -Show help and exit.
  -l Show only specified level.
Options: [aclrsuChqv]
  -v Turn on verbose output.
  -a, --all                        Show services from all run levels
  -c, --crashed                    Show crashed services
  -l, --list                        Show list of run levels
  -r, --runlevel                    Show the name of the current runlevel
  -s, --servicelist                Show service list
  -u, --unused                      Show services not assigned to any runlevel
  -h, --help                        Display this help output
  -C, --nocolor                    Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                      Run quietly

Revision as of 03:05, 14 August 2010

Alpine Linux Init System

Alpine Linux uses OpenRC for its init system.

Quick-Start Information

Alpine Linux has the following commands for managing services:

  • rc-update add service <runlevel>
  • rc-update del service <runlevel>
  • rc-status
Tip: Prior to Alpine Linux 2.0, you might need to use the following commands instead: rc_add, rc_delete, rc_status.

rc-update usage

Usage: rc-update [options] add service <runlevel>
       rc-update [options] del service <runlevel>
       rc-update [options] show

Options: [suChqv]
  -s, --stack                       Stack a runlevel instead of a service
  -u, --update                      Force an update of the dependency tree
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly

rc-status usage

Usage: rc-status [options] [runlevel1] [runlevel2] ...

Options: [aclrsuChqv]
  -a, --all                         Show services from all run levels
  -c, --crashed                     Show crashed services
  -l, --list                        Show list of run levels
  -r, --runlevel                    Show the name of the current runlevel
  -s, --servicelist                 Show service list
  -u, --unused                      Show services not assigned to any runlevel
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly