1.\" $OpenBSD: rc.conf.8,v 1.19 2011/07/08 17:43:58 sthen Exp $ 2.\" 3.\" Copyright (c) 1997 Ian F. Darwin 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of the author may not be used to endorse or promote 15.\" products derived from this software without specific prior written 16.\" permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 19.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 20.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 22.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.Dd $Mdocdate: July 8 2011 $ 31.Dt RC.CONF 8 32.Os 33.Sh NAME 34.Nm rc.conf , 35.Nm rc.conf.local 36.Nd system daemon configuration database 37.Sh DESCRIPTION 38This file contains a series of Bourne-shell syntax assignments 39that are used to configure the system daemons. 40It is not read by the kernel, but is sourced by various other files 41in the 42.Pa /etc/rc.* 43series in order to set shell variables used therein 44to control the behaviour of the scripts. 45.Pp 46It is advisable to leave the 47.Pa /etc/rc.conf 48file untouched, and instead create and edit a new 49.Pa /etc/rc.conf.local 50file. 51Variables set in this file will override variables previously set in 52.Pa /etc/rc.conf . 53.Pp 54There are four sections in this file. 55The first is used to turn features on or off. 56For example, whether the system runs the 57.Nm dhcpd 58daemon is determined by the line in this section 59.Bd -literal -offset indent 60dhcpd_flags=NO # for normal use: "" 61.Ed 62.Pp 63If this line is edited to contain some valid dhcpd daemon command-line 64flags, such as 65.Bd -literal -offset indent 66dhcpd_flags="-A abandoned" # for normal use: "" 67.Ed 68.Pp 69then the dhcpd daemon will be started with those options. 70.Pp 71The second section contains some other programs that can either be run or not, 72but that don't need options. 73They can be set to YES or NO. 74For example, the line 75.Bd -literal -offset indent 76nfs_server=NO 77.Ed 78.Pp 79prevents the NFS server daemons from starting. 80To run NFS, just change this line's value from NO to YES, 81.Sy and 82also make whatever changes are needed for the server 83to have something to do (set up the 84.Xr exports 5 85file etc.). 86.Pp 87The third section contains values that parameterize servers started by 88one of the first two sections, and are ignored if the corresponding 89server is not running. 90For example, if 91.Nm nfs_server , 92is enabled, then the line 93.Bd -literal -offset indent 94nfsd_flags="-tun 4" 95.Ed 96.Pp 97provides command-line arguments for the NFS server. 98.Pp 99This particular line instructs 100.Xr nfsd 8 101to start four copies of the server. 102On a busy file server, 8 (or more) copies are recommended. 103.Pp 104The fourth section contains the 105.Va pkg_scripts 106variable, responsible for starting and stopping 107.Xr rc.d 8 108scripts installed by packages in the specified order. 109For example, the following line 110.Bd -literal -offset indent 111pkg_scripts="dbus_daemon cupsd" 112.Ed 113.Pp 114will run 115.Pa /etc/rc.d/dbus_daemon 116then 117.Pa /etc/rc.d/cupsd 118with the 119.Va start 120argument at boot time and in reverse order with the 121.Va stop 122argument at shutdown. 123.Sh SEE ALSO 124.Xr init 8 , 125.Xr intro 8 , 126.Xr rc 8 127.Sh HISTORY 128The 129.Nm 130file first appeared in 131.Ox 2.2 . 132