161619Sbostic.\" Copyright (c) 1980, 1991, 1993 261619Sbostic.\" The Regents of the University of California. All rights reserved. 318905Smckusick.\" 447468Scael.\" %sccs.include.redist.man% 518905Smckusick.\" 6*65104Smckusick.\" @(#)rc.8 8.2 (Berkeley) 12/11/93 747468Scael.\" 847468Scael.Dd 947468Scael.Dt RC 8 1047468Scael.Os BSD 4 1147468Scael.Sh NAME 1247468Scael.Nm rc 1347468Scael.Nd command script for auto\-reboot and daemons 1447468Scael.Sh SYNOPSIS 1547468Scael.Nm rc 1647468Scael.Nm rc.local 1747468Scael.Sh DESCRIPTION 1847468Scael.Nm Rc 1918906Smckusickis the command script which controls the automatic reboot and 2047468Scael.Nm rc.local 2118906Smckusickis the script holding commands which are pertinent only 2218906Smckusickto a specific site. 2347468Scael.Pp 2418905SmckusickWhen an automatic reboot is in progress, 2547468Scael.Nm rc 2618905Smckusickis invoked with the argument 2747468Scael.Em autoboot . 2847468ScaelThe first portion of 2947468Scael.Nm rc 3047468Scaelruns an 3147468Scael.Xr fsck 8 3218905Smckusickwith option 3347468Scael.Fl p 3418905Smckusickto ``preen'' all the disks of minor inconsistencies resulting 3518905Smckusickfrom the last system shutdown and to check for serious inconsistencies 3618905Smckusickcaused by hardware or software failure. 3718905SmckusickIf this auto-check and repair succeeds, then the second part of 3847468Scael.Nm rc 3918905Smckusickis run. 4047468Scael.Pp 4118905SmckusickThe second part of 4247468Scael.Nm rc , 43*65104Smckusickwhich is run after an auto-reboot succeeds and also if 4447468Scael.Nm rc 4518905Smckusickis invoked when a single user shell terminates (see 4647468Scael.Xr init 8 ) , 4718905Smckusickstarts all the daemons on the system, preserves editor files 4818905Smckusickand clears the scratch directory 4947468Scael.Pa /tmp . 5047468Scael.Pp 5147468Scael.Nm Rc.local 5218906Smckusickis executed immediately before any other commands after a successful 5347468Scael.Xr fsck . 5418906SmckusickNormally, the first commands placed in the 5547468Scael.Nm rc.local 5618906Smckusickfile define the machine's name, using 5747468Scael.Xr hostname 1 , 5818906Smckusickand save any possible core image that might have been 5947468Scaelgenerated as a result of a system crash, with 6047468Scael.Xr savecore 8 . 6118906SmckusickThe latter command is included in the 6247468Scael.Nm rc.local 6318906Smckusickfile because the directory in which core dumps are saved 6418906Smckusickis usually site specific. 6547468Scael.Pp 6647468ScaelFollowing tradition, the startup files 6747468Scael.Nm rc 6847468Scaeland 6947468Scael.Nm rc.local 7047468Scaelreside in 7147468Scael.Pa /etc . 7247468Scael.Sh SEE ALSO 7347468Scael.Xr init 8 , 7447468Scael.Xr reboot 8 , 7547468Scael.Xr savecore 8 7647468Scael.Sh HISTORY 7747468ScaelThe 7847468Scael.Nm 7947468Scaelcommand appeared in 8047468Scael.Bx 4.0 . 81