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.4 1998/02/26 02:44:17 jkh 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. 60.Nm Rc.conf 61contains the global system configuration information referenced 62by the rc files, while 63.Nm rc.conf.local 64contains the local system configuration. 65.Pp 66.Nm Rc.shutdown 67is the command script which contains any necessary commands 68to be executed as the system is shut down. 69.Pp 70When an automatic reboot is in progress, 71.Nm rc 72is invoked with the argument 73.Em autoboot . 74The first portion of 75.Nm rc 76runs an 77.Xr fsck 8 78with option 79.Fl p 80to ``preen'' all the disks of minor inconsistencies resulting 81from the last system shutdown and to check for serious inconsistencies 82caused by hardware or software failure. 83If this auto-check and repair succeeds, then the second part of 84.Nm rc 85is run. 86.Pp 87The second part of 88.Nm rc , 89which is run after an auto-reboot succeeds and also if 90.Nm rc 91is invoked when a single user shell terminates (see 92.Xr init 8 ) , 93starts all the daemons on the system, preserves editor files 94and clears the scratch directory 95.Pa /tmp . 96.Pp 97.Nm Rc.serial 98is used to set any special configurations for serial devices. 99.Pp 100.Nm Rc.pccard 101is used to enable PC-cards. 102.Pp 103.Nm Rc.network 104is used to start the network. 105The network is started in three passes. 106The first pass sets the hostname and domainname, configures the network 107interfaces, turns on any IP firewall rules, and starts routing. 108The second pass starts most of the network related daemons. 109The third pass starts NFS, amd, rwhod, Kerberos and 110the multicast routing daemon. 111.Pp 112.Nm Rc.firewall 113is used to configure rules for the kernel based firewall 114service. It has several possible options: 115.Pp 116.Bl -tag -width "fBfilename" -compact -offset indent 117.It open 118will allow anyone in. 119.It client 120will try to protect just this machine. 121.It simple 122will try to protect a whole network. 123.It closed 124totally disables IP services except via lo0 interface. 125.It UNKNOWN 126disables the loading of firewall rules. 127.It filename 128will load the rules in the given filename (full path required). 129.El 130.Pp 131.Nm Rc.atm 132is used to configure ATM network interfaces. 133The interfaces are configured in three passes. 134The first pass performs the initial interface configuration. 135The second pass completes the interface configuration and defines PVCs and 136permanent ATMARP entries. 137The third pass starts any ATM daemons. 138.Pp 139.Nm Rc.<arch> 140runs architecture specific programs. 141.Pp 142.Nm Rc.local 143is executed after the scripts above, but before the rest of the 144.Nm rc 145file is completed. 146Presently, all 147.Nm rc.local 148does is to put version information in 149.Pa /etc/motd . 150.Pp 151Following tradition, the startup files reside in 152.Pa /etc . 153.Sh SEE ALSO 154.Xr rc.conf 5 , 155.Xr init 8 , 156.Xr reboot 8 , 157.Xr savecore 8 158.Sh HISTORY 159The 160.Nm 161command appeared in 162.Bx 4.0 . 163