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