chiark / gitweb /
man: standard-conf: change directory reference to wildcard
[elogind.git] / man / standard-conf.xml
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">
4
5 <refsection>
6   <refsection id='confd'>
7     <title>Configuration Directories and Precedence</title>
8
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>
18
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>
28
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>
34   </refsection>
35
36   <refsection id='main-conf'>
37     <title>Configuration Directories and Precedence</title>
38
39     <para>Default configuration is defined during compilation, so a
40     configuration file is only needed when it is necessary to deviate
41     from those defaults. By default the configuration file in
42     <filename>/etc/systemd/</filename> contains commented out entries
43     showing the defaults as a guide to the administrator. This file
44     can be edited to create local overrides.
45     </para>
46
47     <para>When packages need to customize the configuration, they can
48     install configuration snippets in
49     <filename>/usr/lib/systemd/*.conf.d/</filename>. Files in
50     <filename>/etc/</filename> are reserved for the local
51     administrator, who may use this logic to override the
52     configuration files installed by vendor packages. The main
53     configuration file is read before any of the configuration
54     directories, and has the lowest precedence; entries in a file in
55     any configuration directory override entries in the single
56     configuration file. Files in the
57     <filename>*.conf.d/</filename> configuration subdirectories
58     are sorted by their filename in lexicographic order, regardless of
59     which of the subdirectories they reside in. If multiple files
60     specify the same option, the entry in the file with the
61     lexicographically latest name takes precedence.  It is recommended
62     to prefix all filenames in those subdirectories with a two-digit
63     number and a dash, to simplify the ordering of the files.</para>
64
65     <para>To disable a configuration file supplied by the vendor, the
66     recommended way is to place a symlink to
67     <filename>/dev/null</filename> in the configuration directory in
68     <filename>/etc/</filename>, with the same filename as the vendor
69     configuration file.</para>
70   </refsection>
71 </refsection>