rc.8 (23466) | rc.8 (33839) |
---|---|
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. --- 16 unchanged lines hidden (view full) --- 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 | 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. --- 16 unchanged lines hidden (view full) --- 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$ | 33.\" $Id: rc.8,v 1.3 1997/03/07 03:28:21 jmg Exp $ |
34.\" 35.Dd December 11, 1993 36.Dt RC 8 37.Os BSD 4 38.Sh NAME 39.Nm rc | 34.\" 35.Dd December 11, 1993 36.Dt RC 8 37.Os BSD 4 38.Sh NAME 39.Nm rc |
40.Nd command script for auto\-reboot and daemons | 40.Nd command scripts for auto\-reboot and daemon startup |
41.Sh SYNOPSIS 42.Nm rc | 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.<arch> |
|
43.Nm rc.local | 50.Nm rc.local |
51.Nm rc.shutdown |
|
44.Sh DESCRIPTION 45.Nm Rc | 52.Sh DESCRIPTION 53.Nm Rc |
46is the command script which controls the automatic reboot and | 54is the command script which controls the automatic reboot 55(calling the other scripts) and |
47.Nm rc.local 48is the script holding commands which are pertinent only 49to a specific site. | 56.Nm rc.local 57is the script holding commands which are pertinent only 58to a specific site. |
59.Nm Rc.conf 60contains the global system configuration information referenced 61by the rc files, while 62.Nm rc.conf.local 63contains the local system configuration. |
|
50.Pp | 64.Pp |
65.Nm Rc.shutdown 66is the command script which contains any necessary commands 67to be executed as the system is shut down. 68.Pp |
|
51When an automatic reboot is in progress, 52.Nm rc 53is invoked with the argument 54.Em autoboot . 55The first portion of 56.Nm rc 57runs an 58.Xr fsck 8 --- 11 unchanged lines hidden (view full) --- 70which is run after an auto-reboot succeeds and also if 71.Nm rc 72is invoked when a single user shell terminates (see 73.Xr init 8 ) , 74starts all the daemons on the system, preserves editor files 75and clears the scratch directory 76.Pa /tmp . 77.Pp | 69When an automatic reboot is in progress, 70.Nm rc 71is invoked with the argument 72.Em autoboot . 73The first portion of 74.Nm rc 75runs an 76.Xr fsck 8 --- 11 unchanged lines hidden (view full) --- 88which is run after an auto-reboot succeeds and also if 89.Nm rc 90is invoked when a single user shell terminates (see 91.Xr init 8 ) , 92starts all the daemons on the system, preserves editor files 93and clears the scratch directory 94.Pa /tmp . 95.Pp |
78.Nm Rc.local 79is executed immediately before any other commands after a successful 80.Nm fsck . 81Normally, the first commands placed in the 82.Nm rc.local 83file define the machine's name, using 84.Xr hostname 1 , 85and save any possible core image that might have been 86generated as a result of a system crash, with 87.Xr savecore 8 . 88The latter command is included in the 89.Nm rc.local 90file because the directory in which core dumps are saved 91is usually site specific. | 96.Nm Rc.serial 97is used to set any special configurations for serial devices. |
92.Pp | 98.Pp |
93Following tradition, the startup files | 99.Nm Rc.pccard 100is used to enable PC-cards. 101.Pp 102.Nm Rc.network 103is used to start the network. 104The network is started in three passes. 105The first pass sets the hostname and domainname, configures the network 106interfaces, turns on any IP firewall rules, and starts routing. 107The second pass starts most of the network related daemons. 108The third pass starts NFS, amd, rwhod, Kerberos and 109the multicast routing daemon. 110.Pp 111.Nm Rc.firewall 112is used to configure rules for the kernel based firewall 113service. It has several possible options: 114.Pp 115.Bl -tag -width "fBfilename" -compact -offset indent 116.It open 117will allow anyone in. 118.It client 119will try to protect just this machine. 120.It simple 121will try to protect a whole network. 122.It closed 123totally disables IP services except via lo0 interface. 124.It UNKNOWN 125disables the loading of firewall rules. 126.It filename 127will load the rules in the given filename (full path required). 128.El 129.Pp 130.Nm Rc.<arch> 131runs architecture specific programs. 132.Pp 133.Nm Rc.local 134is executed after the scripts above, but before the rest of the |
94.Nm rc | 135.Nm rc |
95and | 136file is completed. 137Presently, all |
96.Nm rc.local | 138.Nm rc.local |
97reside in | 139does is to put version information in 140.Pa /etc/motd . 141.Pp 142Following tradition, the startup files reside in |
98.Pa /etc . 99.Sh SEE ALSO | 143.Pa /etc . 144.Sh SEE ALSO |
145.Xr rc.conf 5 , |
|
100.Xr init 8 , 101.Xr reboot 8 , 102.Xr savecore 8 103.Sh HISTORY 104The 105.Nm 106command appeared in 107.Bx 4.0 . | 146.Xr init 8 , 147.Xr reboot 8 , 148.Xr savecore 8 149.Sh HISTORY 150The 151.Nm 152command appeared in 153.Bx 4.0 . |