From GhostBSD Wiki
Revision as of 03:47, 13 April 2020 by Slughorn (Talk | contribs) (Created page with "{{welcome}} {{Navbar OpenRC}} ==Introduction== Managing runlevels is usually done through the '''rc-update''' helper, but could of course be done by hand if desired. e.g. ''r...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Welcome to Icon Disti GhostBSD.png Rc-update.
rc - shell
The generic hook into OpenRC.
Ordering rc-scripts
Scripts to run OpenRC
Scripts to run OpenRC
Scripts automatically executed at boot and shutdown
Special scripts
Configuration file for devd(8)
Initscript Configuration Files
Smaller configuration files
Specifies the default settings for all the available options.
The global OpenRC configuration file
GhostBSD specific configurations
Safely edit system rc files
Shows which services are running
Add or delete services
Locate and run an OpenRC service
Back to the Icon Disti GhostBSD.pngSystem


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

All runlevels are represented as folders in /etc/runlevels/ with symlinks to the actual service scripts.
All services must reside in the /etc/init.d or /usr/local/etc/init.d directories. They must also conform to the OpenRC runscript standard.


rc-update shows all runlevels and services:

                 abi | boot                                   
           adjkerntz | boot                                   
        avahi-daemon |      default                           
      avahi-dnsconfd |      default                           
            bootmisc | boot                                   
              bridge | boot                                   
                cron | boot                                   
               cupsd |      default                           
                dbus |      default                           
                devd | boot                                   
               devfs |      default                           
               dmesg | boot                                   
              dumpon | boot                                   
                fsck | boot                                   
                hald |      default                           
              hostid | boot                                   
            hostname | boot                                   
             kldxref | boot                                   
             lightdm |      default                           
               local |      default nonetwork                 
          localmount | boot                                   
             modules | boot                                   
                motd | boot                                   
              moused |      default                           
            netmount |      default                           
             network | boot                                   
           newsyslog | boot                                   
                ntpd |      default                           
                root | boot                                   
             routing | boot                                   
           savecache |                        shutdown        
            savecore | boot                                   
         staticroute | boot                                   
                swap | boot                                   
             syscons | boot                                   
              sysctl | boot                                   
             syslogd | boot                                   
             urandom | boot                                   
             vboxnet |      default                           
             webcamd |      default                           
                 zfs | boot                                   
                zvol | boot

boot shows if a service starts at boot.

If you want a service starting at boot write as root:

rc-update add foo .

If a service don't have to start at boot write:

rc-update delete foo.