chiark / gitweb /
4de0cd1a458bbede87b6b4867b92665a3bef8a65
[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
58     <filename>*.conf.d/</filename> configuration subdirectories
59     are sorted by their filename in lexicographic order, regardless of
60     which of the subdirectories they reside in. If multiple files
61     specify the same option, the entry in the file with the
62     lexicographically latest name takes precedence.  It is recommended
63     to prefix all filenames in those subdirectories with a two-digit
64     number and a dash, to simplify the ordering of the files.</para>
65
66     <para>To disable a configuration file supplied by the vendor, the
67     recommended way is to place a symlink to
68     <filename>/dev/null</filename> in the configuration directory in
69     <filename>/etc/</filename>, with the same filename as the vendor
70     configuration file.</para>
71   </refsection>
72 </refsection>