rc(8)
Name
rc, rc.local − command script for auto-reboot and daemons
Syntax
/etc/rc
/etc/rc.local
Description
The rc command script controls the automatic reboot and rc.local is the script holding commands which are pertinent only to a specific site.
When an automatic reboot is in progress, rc is invoked with the argument autoboot and runs a fsck 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 also if rc is invoked when a single user shell terminates, starts all the daemons on the system, preserves editor files and clears the scratch directory /tmp. For further information, see init(.). The rc.local command is executed immediately before any other commands after a successful fsck. Normally, the first commands placed in the rc.local file define the machine’s name, using hostname(,), and save any possible core image that might have been generated as a result of a system crash, savecore(.). The latter command is included in the rc.local file because the directory in which core dumps are saved is usually site specific.