xref: /csrg-svn/share/man/man8/rc.8 (revision 47468)
1*47468Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
2*47468Scael.\" All rights reserved.
318905Smckusick.\"
4*47468Scael.\" %sccs.include.redist.man%
518905Smckusick.\"
6*47468Scael.\"     @(#)rc.8	6.2 (Berkeley) 03/16/91
7*47468Scael.\"
8*47468Scael.Dd
9*47468Scael.Dt RC 8
10*47468Scael.Os BSD 4
11*47468Scael.Sh NAME
12*47468Scael.Nm rc
13*47468Scael.Nd command script for auto\-reboot and daemons
14*47468Scael.Sh SYNOPSIS
15*47468Scael.Nm rc
16*47468Scael.Nm rc.local
17*47468Scael.Sh DESCRIPTION
18*47468Scael.Nm Rc
1918906Smckusickis the command script which controls the automatic reboot and
20*47468Scael.Nm rc.local
2118906Smckusickis the script holding commands which are pertinent only
2218906Smckusickto a specific site.
23*47468Scael.Pp
2418905SmckusickWhen an automatic reboot is in progress,
25*47468Scael.Nm rc
2618905Smckusickis invoked with the argument
27*47468Scael.Em autoboot .
28*47468ScaelThe first portion of
29*47468Scael.Nm rc
30*47468Scaelruns an
31*47468Scael.Xr fsck 8
3218905Smckusickwith option
33*47468Scael.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
38*47468Scael.Nm rc
3918905Smckusickis run.
40*47468Scael.Pp
4118905SmckusickThe second part of
42*47468Scael.Nm rc ,
4318905Smckusickwhich is run after a auto-reboot succeeds and also if
44*47468Scael.Nm rc
4518905Smckusickis invoked when a single user shell terminates (see
46*47468Scael.Xr init 8 ) ,
4718905Smckusickstarts all the daemons on the system, preserves editor files
4818905Smckusickand clears the scratch directory
49*47468Scael.Pa /tmp .
50*47468Scael.Pp
51*47468Scael.Nm Rc.local
5218906Smckusickis executed immediately before any other commands after a successful
53*47468Scael.Xr fsck .
5418906SmckusickNormally, the first commands placed in the
55*47468Scael.Nm rc.local
5618906Smckusickfile define the machine's name, using
57*47468Scael.Xr hostname 1 ,
5818906Smckusickand save any possible core image that might have been
59*47468Scaelgenerated as a result of a system crash, with
60*47468Scael.Xr savecore 8 .
6118906SmckusickThe latter command is included in the
62*47468Scael.Nm rc.local
6318906Smckusickfile because the directory in which core dumps are saved
6418906Smckusickis usually site specific.
65*47468Scael.Pp
66*47468ScaelFollowing tradition, the startup files
67*47468Scael.Nm rc
68*47468Scaeland
69*47468Scael.Nm rc.local
70*47468Scaelreside in
71*47468Scael.Pa /etc .
72*47468Scael.Sh SEE ALSO
73*47468Scael.Xr init 8 ,
74*47468Scael.Xr reboot 8 ,
75*47468Scael.Xr savecore 8
76*47468Scael.Sh HISTORY
77*47468ScaelThe
78*47468Scael.Nm
79*47468Scaelcommand appeared in
80*47468Scael.Bx 4.0 .
81