1.\" $OpenBSD: rc.conf.8,v 1.22 2014/07/13 10:05:49 jmc 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 13 2014 $ 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 38The file 39.Nm rc.conf 40contains a series of variable assignments that are used to configure 41the system daemons. 42These variables are read by 43.Xr rc 8 44early on in the boot sequence and every time an 45.Xr rc.d 8 46script is executed. 47.Pp 48It is advisable to leave 49.Nm rc.conf 50untouched, and instead create and edit a new 51.Nm rc.conf.local 52file. 53Variables set in this file will override variables previously set in 54.Nm rc.conf . 55.Pp 56.Nm rc.conf 57is made up of variable assignments 58.Pq Ar variable Ns = Ns Ar value 59with comments designated by a hash mark 60.Pq Sq # . 61.Pp 62Some variables are used to turn features on or off. 63For example, whether the system runs the 64.Xr dhcpd 8 65daemon is determined by the following line: 66.Bd -literal -offset indent 67dhcpd_flags=NO 68.Ed 69.Pp 70To run the dhcpd daemon, 71add the following line to 72.Nm rc.conf.local : 73.Bd -literal -offset indent 74dhcpd_flags= 75.Ed 76.Pp 77If instead some options are specified, 78then the dhcpd daemon will be started with those options. 79For example: 80.Bd -literal -offset indent 81dhcpd_flags=-A abandoned 82.Ed 83.Pp 84Other variables specify a simple YES or NO, 85or simply determine the location of a file. 86For example, the location of the ruleset for 87.Xr pf 4 88is given thus: 89.Bd -literal -offset indent 90pf_rules=/etc/pf.conf # Packet filter rules file 91.Ed 92.Pp 93Finally there is the 94.Va pkg_scripts 95variable, responsible for starting and stopping 96.Xr rc.d 8 97scripts installed by packages in the specified order. 98For example: 99.Bd -literal -offset indent 100pkg_scripts=dbus_daemon cupsd 101.Ed 102.Pp 103This will run 104.Pa /etc/rc.d/dbus_daemon 105then 106.Pa /etc/rc.d/cupsd 107with the 108.Va start 109argument at boot time, 110and in reverse order with the 111.Va stop 112argument at shutdown. 113.Sh SEE ALSO 114.Xr init 8 , 115.Xr intro 8 , 116.Xr rc 8 , 117.Xr rc.d 8 118.Sh HISTORY 119The 120.Nm 121file first appeared in 122.Ox 2.2 . 123