xref: /original-bsd/share/man/man8/rc.8 (revision f48c644e)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)rc.8	8.2 (Berkeley) 12/11/93
7.\"
8.Dd
9.Dt RC 8
10.Os BSD 4
11.Sh NAME
12.Nm rc
13.Nd command script for auto\-reboot and daemons
14.Sh SYNOPSIS
15.Nm rc
16.Nm rc.local
17.Sh DESCRIPTION
18.Nm Rc
19is the command script which controls the automatic reboot and
20.Nm rc.local
21is the script holding commands which are pertinent only
22to a specific site.
23.Pp
24When an automatic reboot is in progress,
25.Nm rc
26is invoked with the argument
27.Em autoboot .
28The first portion of
29.Nm rc
30runs an
31.Xr fsck 8
32with option
33.Fl p
34to ``preen'' all the disks of minor inconsistencies resulting
35from the last system shutdown and to check for serious inconsistencies
36caused by hardware or software failure.
37If this auto-check and repair succeeds, then the second part of
38.Nm rc
39is run.
40.Pp
41The second part of
42.Nm rc ,
43which is run after an auto-reboot succeeds and also if
44.Nm rc
45is invoked when a single user shell terminates (see
46.Xr init 8 ) ,
47starts all the daemons on the system, preserves editor files
48and clears the scratch directory
49.Pa /tmp .
50.Pp
51.Nm Rc.local
52is executed immediately before any other commands after a successful
53.Xr fsck .
54Normally, the first commands placed in the
55.Nm rc.local
56file define the machine's name, using
57.Xr hostname 1 ,
58and save any possible core image that might have been
59generated as a result of a system crash, with
60.Xr savecore 8 .
61The latter command is included in the
62.Nm rc.local
63file because the directory in which core dumps are saved
64is usually site specific.
65.Pp
66Following tradition, the startup files
67.Nm rc
68and
69.Nm rc.local
70reside in
71.Pa /etc .
72.Sh SEE ALSO
73.Xr init 8 ,
74.Xr reboot 8 ,
75.Xr savecore 8
76.Sh HISTORY
77The
78.Nm
79command appeared in
80.Bx 4.0 .
81