RC(8) BSD System Manager's Manual RC(8)NAME
rc - command script for auto-reboot and daemons
SYNOPSIS
rc
rc.first
rc.configure
rc.hardware
netstart
rc.local
DESCRIPTION
rc is the command script which controls the automatic reboot. rc.first
is the script holding commands pertinent to the local site which must be
run before file system consistency checks such as sysctl(8) commands to
set limits or splice commands to configure splice disk devices.
rc.configure is a directory holding scripts which may perform additional
configuration of the local system. rc.hardware is a directory holding
scripts which may perform additional hardware configuration such as load-
ing firmware into multi-port serial controllers, enabling power manage-
ment on systems so equipped, or other run-time hardware configuration.
netstart is the script holding variable definitions and commands neces-
sary to start networking for the local site. rc.local is the script
holding commands pertinent to the local site which are executed after the
file systems are mounted and the standard daemons are started.
When an automatic reboot is in progress, rc is invoked with the argument
autoboot. The first portion of rc excutes any commands in rc.first and
then runs an fsck(8) with option -p to ``preen'' all the disks of minor
inconsistencies resulting from the last system 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.
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)),
starts all the daemons on the system, preserves editor files and clears
the scratch directory /tmp.
After a successful fsck local (non-NFS) filesystems are mounted and any
local configuration scripts are executed from the rc.configure directory.
Following rc.configure, any scripts in the rc.hardware script directory
are executed. Once any hardware configuration scripts have been execut-
ed, the netstart script is executed to set the hostname and start any
networking interfaces. After netstart any NFS filesystems listed in
fstab are mounted and the standard system daemons are started. Finally,
any commands listed in the rc.local script are executed.
Following tradition, the startup files rc, rc.first, rc.local and
netstart reside in /etc. The startup script directories rc.configure and
rc.hardware are also located there.
SEE ALSOinit(8), reboot(8), savecore(8)HISTORY
The rc command appeared in 4.0BSD.
4th Berkeley Distribution December 11, 1993 1