Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
RC(8)                   OpenBSD System Manager's Manual                  RC(8)

     rc - command scripts for system startup


     rc is the command script that is invoked by init(8) during an automatic
     reboot and after single user mode is exited; it performs system house-
     keeping chores and starts up system daemons.  As well, rc is intricately
     tied to the netstart script, which runs commands and daemons pertaining
     to the network.  The rc.securelevel and rc.local scripts hold commands
     which are pertinent only to a specific site.

     All four of these startup scripts are (or can be) controlled to some ex-
     tent by variables defined in rc.conf, which specifies which daemons and
     services are to be run.

     When an automatic reboot is in progress, rc is invoked with the argument
     autoboot.  The first portion of rc runs an fsck(8) with option -p to
     ``preen'' all disks of minor inconsistencies resulting from the last sys-
     tem shutdown and to check for serious inconsistencies caused by hardware
     or software failure.  If this auto-check and repair succeeds, then the
     second part of rc is run.

     However, if the file /fastboot exists, fsck(8) will not be invoked during
     this boot.  This file is then removed so that it will be run on subse-
     quent boots.

     The second part of rc, which is run after an auto-reboot succeeds and al-
     so if rc is invoked when a single user shell terminates (see init(8)),
     then asks rc.conf for configuration variables, mounts filesystems, starts
     system daemons, preserves editor files, clears the scratch directory
     /tmp, and saves any possible core image that might have been generated as
     a result of a system crash, with savecore(8).

     Before rc starts most system daemons, netstart(8) is executed.

     rc.securelevel is executed by rc to start daemons that must run before
     the security level changes.  Following this, rc then sets the security
     level to the value specified in the securelevel variable in that file.

     rc.local is executed towards the end of rc (it is not the very last as
     there are a few services that must be the started at the very end).  Nor-
     mally, rc.local contains commands and daemons that are not part of the
     stock installation.

     The rc.conf file contains a series of Bourne-shell syntax assignments
     that are used to configure kernel configurations, network configuration,
     and various other system daemons.  As described above, this file is
     sourced (using sh(1) of course) by /etc/rc.  Various comments in rc.conf
     make it clear what each variable does.  Refer to the specific man pages
     for each daemon to determine what that subsystem does.

     For example, the lpd(8) daemon is controlled by the line

           lpd_flags=NO        # for normal use: "" (or "-l" for debugging)

     This does not start lpd(8) at system startup.  To start lpd(8), the fol-
     lowing entry can be used.

           lpd_flags=""        # for normal use: "" (or "-l" for debugging)

     Alternately, lpd(8) can be started with the -l flag (to log remote con-

           lpd_flags="-l"      # for normal use: "" (or "-l" for debugging)

     Before init(8) starts rc, it sets the process priority, umask, and re-
     source limits according to the ``daemon'' login class as described in

     login.conf(5), sysctl.conf(5), init(8), netstart(8), rc.conf(8),
     rc.shutdown(8), reboot(8), savecore(8)

     The rc command appeared in 4.0BSD.

OpenBSD 3.4                    December 11, 1993                             2


Want to link to this manual page? Use this URL:

home | help