xref: /freebsd/share/man/man8/rc.8 (revision 23f282aa31e9b6fceacd449020e936e98d6f2298)
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.\" $FreeBSD$
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.
119It has several possible options:
120.Pp
121.Bl -tag -width "fBfilename" -compact -offset indent
122.It open
123will allow anyone in.
124.It client
125will try to protect just this machine.
126.It simple
127will try to protect a whole network.
128.It closed
129totally disables IP services except via lo0 interface.
130.It UNKNOWN
131disables the loading of firewall rules.
132.It filename
133will load the rules in the given filename (full path required).
134.El
135.Pp
136.Nm Rc.atm
137is used to configure ATM network interfaces.
138The interfaces are configured in three passes.
139The first pass performs the initial interface configuration.
140The second pass completes the interface configuration and defines PVCs and
141permanent ATMARP entries.
142The third pass starts any ATM daemons.
143.Pp
144.Nm Rc.<arch>
145runs architecture specific programs.
146.Pp
147.Nm Rc.local
148is executed after the scripts above, but before the rest of the
149.Nm rc
150file is completed.
151Presently, all
152.Nm rc.local
153does is to put version information in
154.Pa /etc/motd .
155.Pp
156Following tradition, the startup files reside in
157.Pa /etc .
158.Sh SEE ALSO
159.Xr rc.conf 5 ,
160.Xr init 8 ,
161.Xr reboot 8 ,
162.Xr savecore 8
163.Sh HISTORY
164The
165.Nm
166command appeared in
167.Bx 4.0 .
168