a233116
From fdf1ec82999b343bedaeb48bca55f2dc53d2646d Mon Sep 17 00:00:00 2001
a233116
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
a233116
Date: Tue, 3 Mar 2015 19:10:21 -0500
a233116
Subject: [PATCH] Do not advertise .d snippets over main config file
a233116
a233116
For daemons which have a main configuration file, there's
a233116
little reason for the administrator to use configuration snippets.
a233116
They are useful for packagers which need to override settings, but
a233116
we shouldn't advertise that as the main way of configuring those
a233116
services.
a233116
a233116
https://bugs.freedesktop.org/show_bug.cgi?id=89397
a233116
(cherry picked from commit e93549ef29c4123d9ee45acb5815048390201e49)
a233116
---
a233116
 man/bootchart.conf.xml         |  3 +--
a233116
 man/coredump.conf.xml          |  3 +--
a233116
 man/journald.conf.xml          |  3 +--
a233116
 man/logind.conf.xml            |  8 +++++---
a233116
 man/resolved.conf.xml          |  3 +--
a233116
 man/standard-conf.xml          | 42 ++++++++++++++++++++++++++++++++++--------
a233116
 man/systemd-sleep.conf.xml     |  3 +--
a233116
 man/systemd-system.conf.xml    |  3 +--
a233116
 man/timesyncd.conf.xml         |  3 +--
a233116
 src/bootchart/bootchart.conf   |  7 ++++---
a233116
 src/core/system.conf           |  7 ++++---
a233116
 src/journal/coredump.conf      |  7 ++++---
a233116
 src/journal/journald.conf      |  7 ++++---
a233116
 src/login/logind.conf          |  7 ++++---
a233116
 src/resolve/resolved.conf.in   |  5 +++--
a233116
 src/timesync/timesyncd.conf.in |  7 ++++---
a233116
 16 files changed, 73 insertions(+), 45 deletions(-)
a233116
a233116
diff --git a/man/bootchart.conf.xml b/man/bootchart.conf.xml
a233116
index 8d9700d300..bf6ca0bf9e 100644
a233116
--- a/man/bootchart.conf.xml
a233116
+++ b/man/bootchart.conf.xml
a233116
@@ -68,8 +68,7 @@
a233116
     parameters and graph output.</para>
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml
a233116
index 3d325e6ad7..0b7329bf55 100644
a233116
--- a/man/coredump.conf.xml
a233116
+++ b/man/coredump.conf.xml
a233116
@@ -63,8 +63,7 @@
a233116
     a handler for core dumps invoked by the kernel.</para>
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
a233116
index 364b58f07e..85146b0d82 100644
a233116
--- a/man/journald.conf.xml
a233116
+++ b/man/journald.conf.xml
a233116
@@ -64,8 +64,7 @@
a233116
 
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/logind.conf.xml b/man/logind.conf.xml
a233116
index ffaec50351..ca2b18783c 100644
a233116
--- a/man/logind.conf.xml
a233116
+++ b/man/logind.conf.xml
a233116
@@ -58,11 +58,13 @@
a233116
   <refsect1>
a233116
     <title>Description</title>
a233116
 
a233116
-    <para>These files configure various parameters of the systemd login manager, <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
a233116
+    <para>These files configure various parameters of the systemd
a233116
+    login manager,
a233116
+    <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
a233116
+    </para>
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/resolved.conf.xml b/man/resolved.conf.xml
a233116
index 36cae2706c..8047a4ea75 100644
a233116
--- a/man/resolved.conf.xml
a233116
+++ b/man/resolved.conf.xml
a233116
@@ -63,8 +63,7 @@
a233116
 
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/standard-conf.xml b/man/standard-conf.xml
a233116
index b87d7e955b..36af45927d 100644
a233116
--- a/man/standard-conf.xml
a233116
+++ b/man/standard-conf.xml
a233116
@@ -33,13 +33,39 @@
a233116
     configuration file.</para>
a233116
   </refsection>
a233116
 
a233116
-  <refsection id='conf'>
a233116
-    <title>Configuration File</title>
a233116
-
a233116
-    <para>Configuration is also read from a single configuration file in
a233116
-    <filename>/etc/</filename>. This file is read before any of the
a233116
-    configuration directories, and has the lowest precedence; entries in a file
a233116
-    in any configuration directory override entries in the single configuration
a233116
-    file.</para>
a233116
+  <refsection id='main-conf'>
a233116
+    <title>Configuration Directories and Precedence</title>
a233116
+
a233116
+    <para>Default configuration is defined during compilation, so a
a233116
+    configuration file is only needed when it is necessary to deviate
a233116
+    from those defaults. By default the configuration file in
a233116
+    <filename>/etc/systemd/</filename> contains commented out entries
a233116
+    showing the defaults as a guide to the administrator. This file
a233116
+    can be edited to create local overrides.
a233116
+    </para>
a233116
+
a233116
+    <para>When packages need to customize the configuration, they can
a233116
+    install configuration snippets in
a233116
+    <filename>/usr/lib/systemd/*.conf.d/</filename>. Files in
a233116
+    <filename>/etc/</filename> are reserved for the local
a233116
+    administrator, who may use this logic to override the
a233116
+    configuration files installed by vendor packages. The main
a233116
+    configuration file is read before any of the configuration
a233116
+    directories, and has the lowest precedence; entries in a file in
a233116
+    any configuration directory override entries in the single
a233116
+    configuration file. Files in the
a233116
+    <filename>logind.conf.d/</filename> configuration subdirectories
a233116
+    are sorted by their filename in lexicographic order, regardless of
a233116
+    which of the subdirectories they reside in. If multiple files
a233116
+    specify the same option, the entry in the file with the
a233116
+    lexicographically latest name takes precedence.  It is recommended
a233116
+    to prefix all filenames in those subdirectories with a two-digit
a233116
+    number and a dash, to simplify the ordering of the files.</para>
a233116
+
a233116
+    <para>To disable a configuration file supplied by the vendor, the
a233116
+    recommended way is to place a symlink to
a233116
+    <filename>/dev/null</filename> in the configuration directory in
a233116
+    <filename>/etc/</filename>, with the same filename as the vendor
a233116
+    configuration file.</para>
a233116
   </refsection>
a233116
 </refsection>
a233116
diff --git a/man/systemd-sleep.conf.xml b/man/systemd-sleep.conf.xml
a233116
index 433f2f83a0..bb17ec8669 100644
a233116
--- a/man/systemd-sleep.conf.xml
a233116
+++ b/man/systemd-sleep.conf.xml
a233116
@@ -112,8 +112,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
a233116
     attempts to suspend or hibernate the machine.</para>
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml
a233116
index 7c3f237567..c7bcfaee4d 100644
a233116
--- a/man/systemd-system.conf.xml
a233116
+++ b/man/systemd-system.conf.xml
a233116
@@ -74,8 +74,7 @@
a233116
     operations.</para>
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/man/timesyncd.conf.xml b/man/timesyncd.conf.xml
a233116
index 1127970a18..89a651c662 100644
a233116
--- a/man/timesyncd.conf.xml
a233116
+++ b/man/timesyncd.conf.xml
a233116
@@ -63,8 +63,7 @@
a233116
 
a233116
   </refsect1>
a233116
 
a233116
-  <xi:include href="standard-conf.xml" xpointer="confd" />
a233116
-  <xi:include href="standard-conf.xml" xpointer="conf" />
a233116
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
a233116
 
a233116
   <refsect1>
a233116
     <title>Options</title>
a233116
diff --git a/src/bootchart/bootchart.conf b/src/bootchart/bootchart.conf
a233116
index 2d7cb61217..4f5e50936e 100644
a233116
--- a/src/bootchart/bootchart.conf
a233116
+++ b/src/bootchart/bootchart.conf
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/bootchart.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See bootchart.conf(5) for details
a233116
+# See bootchart.conf(5) for details.
a233116
 
a233116
 [Bootchart]
a233116
 #Samples=500
a233116
diff --git a/src/core/system.conf b/src/core/system.conf
a233116
index a3727200df..231609033b 100644
a233116
--- a/src/core/system.conf
a233116
+++ b/src/core/system.conf
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/system.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See systemd-system.conf(5) for details
a233116
+# See systemd-system.conf(5) for details.
a233116
 
a233116
 [Manager]
a233116
 #LogLevel=info
a233116
diff --git a/src/journal/coredump.conf b/src/journal/coredump.conf
a233116
index 0fe9fe801a..c2f0643e03 100644
a233116
--- a/src/journal/coredump.conf
a233116
+++ b/src/journal/coredump.conf
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/coredump.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See coredump.conf(5) for details
a233116
+# See coredump.conf(5) for details.
a233116
 
a233116
 [Coredump]
a233116
 #Storage=external
a233116
diff --git a/src/journal/journald.conf b/src/journal/journald.conf
a233116
index 29bdf8f183..47eefe91c1 100644
a233116
--- a/src/journal/journald.conf
a233116
+++ b/src/journal/journald.conf
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/journald.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See journald.conf(5) for details
a233116
+# See journald.conf(5) for details.
a233116
 
a233116
 [Journal]
a233116
 #Storage=auto
a233116
diff --git a/src/login/logind.conf b/src/login/logind.conf
a233116
index 6b1943a2d1..834c4c2ebf 100644
a233116
--- a/src/login/logind.conf
a233116
+++ b/src/login/logind.conf
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/logind.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See logind.conf(5) for details
a233116
+# See logind.conf(5) for details.
a233116
 
a233116
 [Login]
a233116
 #NAutoVTs=6
a233116
diff --git a/src/resolve/resolved.conf.in b/src/resolve/resolved.conf.in
a233116
index e5a19ee474..3eb19e42b7 100644
a233116
--- a/src/resolve/resolved.conf.in
a233116
+++ b/src/resolve/resolved.conf.in
a233116
@@ -5,8 +5,9 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/resolved.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
 # See resolved.conf(5) for details
a233116
 
a233116
diff --git a/src/timesync/timesyncd.conf.in b/src/timesync/timesyncd.conf.in
a233116
index fc3c6c49cf..b6a2ada273 100644
a233116
--- a/src/timesync/timesyncd.conf.in
a233116
+++ b/src/timesync/timesyncd.conf.in
a233116
@@ -5,10 +5,11 @@
a233116
 #  the Free Software Foundation; either version 2.1 of the License, or
a233116
 #  (at your option) any later version.
a233116
 #
a233116
-# You can override the directives in this file by creating files in
a233116
-# /etc/systemd/timesyncd.conf.d/*.conf.
a233116
+# Entries in this file show the compile time defaults.
a233116
+# You can change settings by editing this file.
a233116
+# Defaults can be restored by simply deleting this file.
a233116
 #
a233116
-# See timesyncd.conf(5) for details
a233116
+# See timesyncd.conf(5) for details.
a233116
 
a233116
 [Time]
a233116
 #NTP=