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 337f3dea24SPeter Wemm.\" $FreeBSD$ 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 497d5c779cSPoul-Henning Kamp.Nm rc.atm 50e4f980d3SJordan K. Hubbard.Nm rc.<arch> 51afe61c15SRodney W. Grimes.Nm rc.local 52e4f980d3SJordan K. Hubbard.Nm rc.shutdown 53afe61c15SRodney W. Grimes.Sh DESCRIPTION 54afe61c15SRodney W. Grimes.Nm Rc 55e4f980d3SJordan K. Hubbardis the command script which controls the automatic reboot 56e4f980d3SJordan K. Hubbard(calling the other scripts) and 57afe61c15SRodney W. Grimes.Nm rc.local 58afe61c15SRodney W. Grimesis the script holding commands which are pertinent only 59f633e4c9SMatthew Dillonto a specific site. Typically, the /usr/local/etc/rc.d 60f633e4c9SMatthew Dillonmechanism is used instead of rc.local these days but if 61f633e4c9SMatthew Dillonyou do want to use rc.local, /etc/rc still supports it. 62f633e4c9SMatthew DillonIn this case, rc.local should source /etc/rc.conf and 63f633e4c9SMatthew Dilloncontain additional custom startup code for your system. 64e4f980d3SJordan K. Hubbard.Nm Rc.conf 65e4f980d3SJordan K. Hubbardcontains the global system configuration information referenced 66e4f980d3SJordan K. Hubbardby the rc files, while 67e4f980d3SJordan K. Hubbard.Nm rc.conf.local 68ab327a82SMatthew Dilloncontains the local system configuration. See rc.conf(5) 69e4f980d3SJordan K. Hubbard.Pp 70e4f980d3SJordan K. Hubbard.Nm Rc.shutdown 71e4f980d3SJordan K. Hubbardis the command script which contains any necessary commands 72e4f980d3SJordan K. Hubbardto be executed as the system is shut down. 73afe61c15SRodney W. Grimes.Pp 74afe61c15SRodney W. GrimesWhen an automatic reboot is in progress, 75afe61c15SRodney W. Grimes.Nm rc 76afe61c15SRodney W. Grimesis invoked with the argument 77afe61c15SRodney W. Grimes.Em autoboot . 78afe61c15SRodney W. GrimesThe first portion of 79afe61c15SRodney W. Grimes.Nm rc 80afe61c15SRodney W. Grimesruns an 81afe61c15SRodney W. Grimes.Xr fsck 8 82afe61c15SRodney W. Grimeswith option 83afe61c15SRodney W. Grimes.Fl p 84afe61c15SRodney W. Grimesto ``preen'' all the disks of minor inconsistencies resulting 85afe61c15SRodney W. Grimesfrom the last system shutdown and to check for serious inconsistencies 86afe61c15SRodney W. Grimescaused by hardware or software failure. 87afe61c15SRodney W. GrimesIf this auto-check and repair succeeds, then the second part of 88afe61c15SRodney W. Grimes.Nm rc 89afe61c15SRodney W. Grimesis run. 90afe61c15SRodney W. Grimes.Pp 91afe61c15SRodney W. GrimesThe second part of 92afe61c15SRodney W. Grimes.Nm rc , 93afe61c15SRodney W. Grimeswhich is run after an auto-reboot succeeds and also if 94afe61c15SRodney W. Grimes.Nm rc 95afe61c15SRodney W. Grimesis invoked when a single user shell terminates (see 96afe61c15SRodney W. Grimes.Xr init 8 ) , 97afe61c15SRodney W. Grimesstarts all the daemons on the system, preserves editor files 98afe61c15SRodney W. Grimesand clears the scratch directory 99afe61c15SRodney W. Grimes.Pa /tmp . 100afe61c15SRodney W. Grimes.Pp 101e4f980d3SJordan K. Hubbard.Nm Rc.serial 102e4f980d3SJordan K. Hubbardis used to set any special configurations for serial devices. 103afe61c15SRodney W. Grimes.Pp 104e4f980d3SJordan K. Hubbard.Nm Rc.pccard 105e4f980d3SJordan K. Hubbardis used to enable PC-cards. 106e4f980d3SJordan K. Hubbard.Pp 107e4f980d3SJordan K. Hubbard.Nm Rc.network 108e4f980d3SJordan K. Hubbardis used to start the network. 109e4f980d3SJordan K. HubbardThe network is started in three passes. 110e4f980d3SJordan K. HubbardThe first pass sets the hostname and domainname, configures the network 111e4f980d3SJordan K. Hubbardinterfaces, turns on any IP firewall rules, and starts routing. 112e4f980d3SJordan K. HubbardThe second pass starts most of the network related daemons. 113e4f980d3SJordan K. HubbardThe third pass starts NFS, amd, rwhod, Kerberos and 114e4f980d3SJordan K. Hubbardthe multicast routing daemon. 115e4f980d3SJordan K. Hubbard.Pp 116e4f980d3SJordan K. Hubbard.Nm Rc.firewall 117e4f980d3SJordan K. Hubbardis used to configure rules for the kernel based firewall 1181111b49cSSheldon Hearnservice. 1191111b49cSSheldon HearnIt has several possible options: 120e4f980d3SJordan K. Hubbard.Pp 121e4f980d3SJordan K. Hubbard.Bl -tag -width "fBfilename" -compact -offset indent 122e4f980d3SJordan K. Hubbard.It open 123e4f980d3SJordan K. Hubbardwill allow anyone in. 124e4f980d3SJordan K. Hubbard.It client 125e4f980d3SJordan K. Hubbardwill try to protect just this machine. 126e4f980d3SJordan K. Hubbard.It simple 127e4f980d3SJordan K. Hubbardwill try to protect a whole network. 128e4f980d3SJordan K. Hubbard.It closed 129e4f980d3SJordan K. Hubbardtotally disables IP services except via lo0 interface. 130e4f980d3SJordan K. Hubbard.It UNKNOWN 131e4f980d3SJordan K. Hubbarddisables the loading of firewall rules. 132e4f980d3SJordan K. Hubbard.It filename 133e4f980d3SJordan K. Hubbardwill load the rules in the given filename (full path required). 134e4f980d3SJordan K. Hubbard.El 135e4f980d3SJordan K. Hubbard.Pp 1367d5c779cSPoul-Henning Kamp.Nm Rc.atm 1377d5c779cSPoul-Henning Kampis used to configure ATM network interfaces. 1387d5c779cSPoul-Henning KampThe interfaces are configured in three passes. 1397d5c779cSPoul-Henning KampThe first pass performs the initial interface configuration. 1407d5c779cSPoul-Henning KampThe second pass completes the interface configuration and defines PVCs and 1417d5c779cSPoul-Henning Kamppermanent ATMARP entries. 1427d5c779cSPoul-Henning KampThe third pass starts any ATM daemons. 1437d5c779cSPoul-Henning Kamp.Pp 144e4f980d3SJordan K. Hubbard.Nm Rc.<arch> 145e4f980d3SJordan K. Hubbardruns architecture specific programs. 146e4f980d3SJordan K. Hubbard.Pp 147e4f980d3SJordan K. Hubbard.Nm Rc.local 148e4f980d3SJordan K. Hubbardis executed after the scripts above, but before the rest of the 149afe61c15SRodney W. Grimes.Nm rc 150e4f980d3SJordan K. Hubbardfile is completed. 151e4f980d3SJordan K. HubbardPresently, all 152afe61c15SRodney W. Grimes.Nm rc.local 153e4f980d3SJordan K. Hubbarddoes is to put version information in 154e4f980d3SJordan K. Hubbard.Pa /etc/motd . 155e4f980d3SJordan K. Hubbard.Pp 156e4f980d3SJordan K. HubbardFollowing tradition, the startup files reside in 157afe61c15SRodney W. Grimes.Pa /etc . 158afe61c15SRodney W. Grimes.Sh SEE ALSO 159e4f980d3SJordan K. Hubbard.Xr rc.conf 5 , 160afe61c15SRodney W. Grimes.Xr init 8 , 161afe61c15SRodney W. Grimes.Xr reboot 8 , 162afe61c15SRodney W. Grimes.Xr savecore 8 163afe61c15SRodney W. Grimes.Sh HISTORY 164afe61c15SRodney W. GrimesThe 165afe61c15SRodney W. Grimes.Nm 166afe61c15SRodney W. Grimescommand appeared in 167afe61c15SRodney W. Grimes.Bx 4.0 . 168