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