RC(8) — UNIX Programmer’s Manual
NAME
rc − command script for auto-reboot and daemons
SYNOPSIS
/etc/rc
/etc/rc.config
/etc/rc.net
/etc/rc.yp
/etc/rc.X
/etc/rc.local
/etc/rc.exit
DESCRIPTION
Rc is the command script which controls multi-user startup; rc.config, rc.net, rc.yp, rc.X and rc.local are scripts which may be run by rc to initialise various classes of service, e.g. network daemons, X windows.
The first task of rc is to decide whether or not to run fsck(8) with the −p option to “preen” all the discs of minor inconsistencies resulting from the last system shutdown and to check for serious inconsistencies caused by hardware or software failure.
The decision whether or not to run fsck goes as follows:
•If the file fastboot exists in the root directory, then the check is skipped.
•If /fastboot does not exist, but /slowboot does, then the check is run.
•If neither fastboot nor slowboot exist, then rc will run fsck only if the system is being booted directly into multi-user mode.
If fsck finds any problems, it will return an appropriate exit status to rc which will either reboot(8) the system, or, if fsck could not automatically repair the damage, start a single-user shell by using rc.exit to return an error status to init(8).
If fsck succeeds, or is not run, rc mounts the filesystems listed in fstab(5), preserves editor files, clears the scratch directory /tmp, and starts all the daemons required by the system.
System configuration is controlled by rc.config, which defines the following variables:
STANDALONE
A machine with STANDALONE set to TRUE will have no network connections to the outside world; this overrides any explicit settings made for FULLNETWORK and NIS, setting them both to FALSE. If STANDALONE is FALSE, then rc will run rc.net which defines the hostname, and runs ifconfig(8) for each network interface present in the machine.
FULLNETWORK
Setting FULLNETWORK to TRUE will enable the use of networked file systems via NFS.
NIS
NIS enables / disables the Network Information Service. If TRUE, then rc will run rc.yp to define the machine’s domainname and start up the NIS daemons.
DISPLAYCONSOLELOG
If this variable is TRUE, then all messages sent to /var/spool/console.log by syslogd(8) will be echoed to /dev/console.
Finally, rc runs the files rc.X and rc.local to start up X11 and local services respectively.
SEE ALSO
fstab(5), init(8), reboot(8), ifconfig(8), ypbind(8), ypserv(8), syslogd(8),
RISCiX System Administrator’s Guide,
RISCiX X Windows System Administrator’s Guide.
BUGS
4th Berkeley Distribution — Revision 1.4 of 06/11/90