1 <?xml version="1.0"?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refsection PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
6 <refsection id='confd'>
7 <title>Configuration Directories and Precedence</title>
9 <para>Configuration files are read from directories in
10 <filename>/etc/</filename>, <filename>/run/</filename>, and
11 <filename>/usr/lib/</filename>, in order of precedence.
12 Each configuration file in these configuration directories shall be named in
13 the style of <filename><replaceable>filename</replaceable>.conf</filename>.
14 Files in <filename>/etc/</filename> override files with the same name in
15 <filename>/run/</filename> and <filename>/usr/lib/</filename>. Files in
16 <filename>/run/</filename> override files with the same name in
17 <filename>/usr/lib/</filename>.</para>
19 <para>Packages should install their configuration files in
20 <filename>/usr/lib/</filename>. Files in <filename>/etc/</filename> are
21 reserved for the local administrator, who may use this logic to override the
22 configuration files installed by vendor packages. All configuration files
23 are sorted by their filename in lexicographic order, regardless of which of
24 the directories they reside in. If multiple files specify the same option,
25 the entry in the file with the lexicographically latest name will take
26 precedence. It is recommended to prefix all filenames with a two-digit number
27 and a dash, to simplify the ordering of the files.</para>
29 <para>If the administrator wants to disable a configuration file supplied by
30 the vendor, the recommended way is to place a symlink to
31 <filename>/dev/null</filename> in the configuration directory in
32 <filename>/etc/</filename>, with the same filename as the vendor
33 configuration file.</para>
36 <refsection id='conf'>
37 <title>Configuration File</title>
39 <para>Configuration is also read from a single configuration file in
40 <filename>/etc/</filename>. This file is read before any of the
41 configuration directories, and has the lowest precedence; entries in a file
42 in any configuration directory override entries in the single configuration