Editing Rc-update

Jump to: navigation, search

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 8: Line 8:
 
All services must reside in the '''/etc/[[Init.d|init.d]]''' or '''/usr/[[Local/etc/init.d|local/etc/init.d]]''' directories. They must also conform to the '''OpenRC''' runscript standard.
 
All services must reside in the '''/etc/[[Init.d|init.d]]''' or '''/usr/[[Local/etc/init.d|local/etc/init.d]]''' directories. They must also conform to the '''OpenRC''' runscript standard.
  
==Manual==
+
===Rc-update===
  
NAME
+
<code>rc-update</code> shows all runlevels and services:
   
+
rc-update – add and remove services to and from a runlevel
+
 
+
SYNOPSIS
+
    rc-update [-s, --stack] add service [runlevel ...]
+
    rc-update [-s, --stack] [-a, --all] delete service [runlevel ...]
+
    rc-update [-u, --update] [-v, --verbose] show [runlevel ...]
+
 
+
DESCRIPTION
+
   
+
[[OpenRC]] uses named runlevels.  Rather than editing some obscure file or    managing a directory of symlinks, rc-update exists to quickly add or    delete services to and from from different runlevels.  All services must    reside in the /etc/[[init.d]] or /usr/[[local/etc/init.d]] directories. 
+
 
+
They    must also be standard [[OpenRC]] scripts, meaning they must use openrc-run.
+
 
+
    add service            Add the service to the runlevel or the current
+
                            one if none given.  Services added to the boot
+
                            runlevel must exist in /etc/init.d.
+
 
+
    delete service          Delete the service from the runlevel or the
+
                            current one if none given.
+
 
+
    show                    Show all enabled services and the runlevels they
+
                            belong to.  If you specify runlevels to show,
+
                            then only those will be included in the output.
+
 
+
    -v, --verbose          Show all services.
+
 
+
    -u, --update            Forces an update of the dependency tree cache.
+
                            This may be needed in the event of clock skew (a
+
                            file in /etc is newer than the system clock).
+
 
+
If the -s, --stack option is given then we either add or remove the    runlevel from the runlevel.  This allows inheritance of runlevels.
+
 
+
If the -a, --all option is given, we remove the service from all    runlevels. This is useful, for example, to clean up the dangling symlinks    after a service is removed.
+
 
+
 
+
 
+
===Rc-update Example===
+
====Rc-update without options====
+
<code>rc-update</code> without option shows all runlevels and services:
+
  
 
                   abi | boot                                   
 
                   abi | boot                                   
Line 68: Line 28:
 
                 hald |      default                           
 
                 hald |      default                           
 
               hostid | boot                                   
 
               hostid | boot                                   
             hostname | boot
+
             hostname | boot                                  
                ipfw |      default             
+
 
               kldxref | boot                                   
 
               kldxref | boot                                   
 
               lightdm |      default                           
 
               lightdm |      default                           
Line 98: Line 57:
 
''boot'' shows if a service starts at boot.
 
''boot'' shows if a service starts at boot.
  
====Rc-update with option "add""====
 
 
If you want a service starting at boot write as root: <br/>
 
If you want a service starting at boot write as root: <br/>
  
 
<code>rc-update add foo</code> .<br/>
 
<code>rc-update add foo</code> .<br/>
  
====Rc-update with option "delate"====
 
 
If a service don't have to start at boot write:  <br/>
 
If a service don't have to start at boot write:  <br/>
  

Please note that all contributions to GhostBSD Wiki are considered to be released under the Creative Commons Attribution (see GhostBSD Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page: