xref: /openbsd/share/man/man8/rc.conf.8 (revision 9b7c3dbb)
1.\"	$OpenBSD: rc.conf.8,v 1.28 2015/12/05 21:35:46 jmc Exp $
2.\"
3.\" Copyright (c) 1997 Ian F. Darwin
4.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. The name of the author may not be used to endorse or promote
16.\"    products derived from this software without specific prior written
17.\"    permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
20.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.Dd $Mdocdate: December 5 2015 $
32.Dt RC.CONF 8
33.Os
34.Sh NAME
35.Nm rc.conf ,
36.Nm rc.conf.local
37.Nd system daemon configuration database
38.Sh DESCRIPTION
39The file
40.Nm rc.conf
41contains a series of variable assignments that are used to configure
42the system daemons.
43These variables are read by
44.Xr rc 8
45early on in the boot sequence and every time an
46.Xr rc.d 8
47script is executed.
48.Pp
49It is advisable to leave
50.Nm rc.conf
51untouched, and instead create and edit a new
52.Nm rc.conf.local
53file or use the
54.Xr rcctl 8
55utility.
56Since only the last assignment to any variable takes effect,
57variables set in this file override variables previously set in
58.Nm rc.conf .
59.Pp
60.Nm rc.conf
61is made up of variable assignments
62.Pq Ar variable Ns = Ns Ar value
63with comments designated by a hash mark
64.Pq Sq # .
65.Pp
66.Sy Base system daemon
67configuration variables are used to enable and disable daemon programs
68that are installed by default, and to set their command line options.
69.Pp
70All of these variables follow the format
71.Dq Ar daemon Ns _flags
72where
73.Ar daemon
74is the name of one of the
75.Xr rc.d 8
76daemon control scripts.
77The list of base system daemons, including the information whether
78they are enabled by default, can be displayed with this command:
79.Pp
80.Dl grep _flags /etc/rc.conf
81.Pp
82If one of these variables is set to
83.Cm NO ,
84the respective
85.Ar daemon
86is disabled.
87If set to the empty string, the
88.Ar daemon
89is run with the default command line arguments defined in its
90.Xr rc.d 8
91.Ar daemon
92script, or without command line arguments if no such default exists.
93If set to any other value, including a string containing
94only a single blank character, the
95.Ar daemon
96is run with those command line arguments.
97.Pp
98.Sy Package daemon
99configuration variables are used to enable and disable
100daemon programs installed from
101.Xr packages 7 ,
102and to set their command line options.
103.Pp
104The special
105.Cm pkg_scripts
106variable lists
107.Xr rc.d 8
108.Ar daemon
109control scripts to be started in the specified order.
110For each
111.Ar daemon
112listed, its default command line options can optionally be overridden
113using the variable
114.Ar daemon Ns _flags
115as described above.
116.Pp
117.Sy Base system service
118configuration variables control features available by default
119that are not implemented as daemons.
120They can be set to either
121.Cm YES
122or
123.Cm NO .
124When set to
125.Cm YES ,
126they have the following effects:
127.Bl -tag -width check_quotas
128.It Cm accounting
129rc calls:
130.Xr accton 8
131.Pa /var/account/acct
132.It Cm check_quotas
133rc calls:
134.Xr quotacheck 8
135.Fl a ;
136.Xr quotaon 8
137.Fl a
138.It Cm ipsec
139rc calls:
140.Xr ipsecctl 8
141.Fl f Pa /etc/ipsec.conf
142.It Cm multicast
143See
144.Xr netstart 8 .
145.It Cm pf
146rc calls:
147.Xr pfctl 8
148.Fl ef Pa /etc/pf.conf
149.It Cm spamd_black
150The script
151.Pa /etc/rc.d/spamd
152uses
153.Fl b
154in front of any other configured command line arguments when running
155.Xr spamd 8
156and
157.Xr spamd-setup 8 .
158.El
159.Pp
160.Sy Auxiliary
161configuration variables mostly determine
162the locations of specific configuration files.
163The boot scripts use them as follows:
164.Bl -tag -width amd_master
165.It Cm amd_master
166The
167.Xr amd 8
168master map file.
169The script
170.Pa /etc/rc.d/amd
171appends its content to the command line when starting the auto mounter daemon.
172.It Cm shlib_dirs
173Extra shared library search path entries.
174rc calls:
175.Xr ldconfig 8
176.Pa /usr/X11R6/lib
177.Pa /usr/local/lib
178.Pf $ Brq Ar shlib_dirs
179.El
180.Sh EXAMPLES
181Do not start the
182.Xr dhcpd 8
183daemon when booting the system:
184.Bd -literal -offset indent
185dhcpd_flags=NO
186.Ed
187.Pp
188To run the dhcpd daemon,
189add the following line to
190.Nm rc.conf.local :
191.Bd -literal -offset indent
192dhcpd_flags=
193.Ed
194.Pp
195To start it with some options:
196.Bd -literal -offset indent
197dhcpd_flags=-A abandoned
198.Ed
199.Pp
200Run
201.Pa /etc/rc.d/messagebus
202then
203.Pa /etc/rc.d/cupsd
204with the
205.Cm start
206argument at boot time,
207and in reverse order with the
208.Cm stop
209argument at shutdown:
210.Bd -literal -offset indent
211pkg_scripts=messagebus cupsd
212.Ed
213.Pp
214The default location of the
215.Xr amd 8
216master map file is:
217.Bd -literal -offset indent
218amd_master=/etc/amd/master	# AMD 'master' map
219.Ed
220.Sh SEE ALSO
221.Xr init 8 ,
222.Xr intro 8 ,
223.Xr rc 8 ,
224.Xr rc.d 8 ,
225.Xr rcctl 8
226.Sh HISTORY
227The
228.Nm
229file first appeared in
230.Ox 2.2 .
231