xref: /freebsd/share/man/man8/rc.8 (revision 380a989b3223d455375b4fae70fd0b9bdd43bafb)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)rc.8	8.2 (Berkeley) 12/11/93
33.\"	$Id: rc.8,v 1.6 1998/12/12 23:08:34 dillon Exp $
34.\"
35.Dd December 11, 1993
36.Dt RC 8
37.Os BSD 4
38.Sh NAME
39.Nm rc
40.Nd command scripts for auto\-reboot and daemon startup
41.Sh SYNOPSIS
42.Nm rc
43.Nm rc.conf
44.Nm rc.conf.local
45.Nm rc.serial
46.Nm rc.pccard
47.Nm rc.network
48.Nm rc.firewall
49.Nm rc.atm
50.Nm rc.<arch>
51.Nm rc.local
52.Nm rc.shutdown
53.Sh DESCRIPTION
54.Nm Rc
55is the command script which controls the automatic reboot
56(calling the other scripts) and
57.Nm rc.local
58is the script holding commands which are pertinent only
59to a specific site.  Typically, the /usr/local/etc/rc.d
60mechanism is used instead of rc.local these days but if
61you do want to use rc.local, /etc/rc still supports it.
62In this case, rc.local should source /etc/rc.conf and
63contain additional custom startup code for your system.
64.Nm Rc.conf
65contains the global system configuration information referenced
66by the rc files, while
67.Nm rc.conf.local
68contains the local system configuration.  See rc.conf(5)
69.Pp
70.Nm Rc.shutdown
71is the command script which contains any necessary commands
72to be executed as the system is shut down.
73.Pp
74When an automatic reboot is in progress,
75.Nm rc
76is invoked with the argument
77.Em autoboot .
78The first portion of
79.Nm rc
80runs an
81.Xr fsck 8
82with option
83.Fl p
84to ``preen'' all the disks of minor inconsistencies resulting
85from the last system shutdown and to check for serious inconsistencies
86caused by hardware or software failure.
87If this auto-check and repair succeeds, then the second part of
88.Nm rc
89is run.
90.Pp
91The second part of
92.Nm rc ,
93which is run after an auto-reboot succeeds and also if
94.Nm rc
95is invoked when a single user shell terminates (see
96.Xr init 8 ) ,
97starts all the daemons on the system, preserves editor files
98and clears the scratch directory
99.Pa /tmp .
100.Pp
101.Nm Rc.serial
102is used to set any special configurations for serial devices.
103.Pp
104.Nm Rc.pccard
105is used to enable PC-cards.
106.Pp
107.Nm Rc.network
108is used to start the network.
109The network is started in three passes.
110The first pass sets the hostname and domainname, configures the network
111interfaces, turns on any IP firewall rules, and starts routing.
112The second pass starts most of the network related daemons.
113The third pass starts NFS, amd, rwhod, Kerberos and
114the multicast routing daemon.
115.Pp
116.Nm Rc.firewall
117is used to configure rules for the kernel based firewall
118service. It has several possible options:
119.Pp
120.Bl -tag -width "fBfilename" -compact -offset indent
121.It open
122will allow anyone in.
123.It client
124will try to protect just this machine.
125.It simple
126will try to protect a whole network.
127.It closed
128totally disables IP services except via lo0 interface.
129.It UNKNOWN
130disables the loading of firewall rules.
131.It filename
132will load the rules in the given filename (full path required).
133.El
134.Pp
135.Nm Rc.atm
136is used to configure ATM network interfaces.
137The interfaces are configured in three passes.
138The first pass performs the initial interface configuration.
139The second pass completes the interface configuration and defines PVCs and
140permanent ATMARP entries.
141The third pass starts any ATM daemons.
142.Pp
143.Nm Rc.<arch>
144runs architecture specific programs.
145.Pp
146.Nm Rc.local
147is executed after the scripts above, but before the rest of the
148.Nm rc
149file is completed.
150Presently, all
151.Nm rc.local
152does is to put version information in
153.Pa /etc/motd .
154.Pp
155Following tradition, the startup files reside in
156.Pa /etc .
157.Sh SEE ALSO
158.Xr rc.conf 5 ,
159.Xr init 8 ,
160.Xr reboot 8 ,
161.Xr savecore 8
162.Sh HISTORY
163The
164.Nm
165command appeared in
166.Bx 4.0 .
167