From 09db71a4a3fb9cee19f89cb75ad453caa46209b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 18 Feb 2021 20:57:06 +0100 Subject: [PATCH] Recommend drop-ins over modifications to the main config file As discussed in https://github.com/systemd/systemd/pull/18347. --- man/standard-conf.xml | 5 +++-- src/core/system.conf.in | 15 ++++++++------- src/core/user.conf.in | 16 +++++++++------- src/coredump/coredump.conf | 15 ++++++++------- src/home/homed.conf | 17 +++++++++-------- src/journal-remote/journal-remote.conf.in | 17 +++++++++-------- src/journal-remote/journal-upload.conf.in | 17 +++++++++-------- src/journal/journald.conf | 15 ++++++++------- src/login/logind.conf.in | 15 ++++++++------- src/network/networkd.conf | 17 +++++++++-------- src/oom/oomd.conf | 15 ++++++++------- src/pstore/pstore.conf | 15 ++++++++------- src/resolve/resolved.conf.in | 17 +++++++++-------- src/sleep/sleep.conf | 17 +++++++++-------- src/timesync/timesyncd.conf.in | 15 ++++++++------- 15 files changed, 122 insertions(+), 106 deletions(-) diff --git a/man/standard-conf.xml b/man/standard-conf.xml index edb7887b4fa..f02b9b0594e 100644 --- a/man/standard-conf.xml +++ b/man/standard-conf.xml @@ -44,8 +44,9 @@ The default configuration is set during compilation, so configuration is only needed when it is necessary to deviate from those defaults. Initially, the main configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the - administrator. Local overrides can be created by editing this file or by creating drop-ins, see below. - + administrator. Local overrides can be created by editing this file or by creating drop-ins, as described + below. Using drop-ins for local configuration is recommended over modifications to the main configuration + file. In addition to the "main" configuration file, drop-in configuration snippets are read from /usr/lib/systemd/*.conf.d/, /usr/local/lib/systemd/*.conf.d/, diff --git a/src/core/system.conf.in b/src/core/system.conf.in index 40bb5488871..eecaff9f276 100644 --- a/src/core/system.conf.in +++ b/src/core/system.conf.in @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See systemd-system.conf(5) for details. diff --git a/src/core/user.conf.in b/src/core/user.conf.in index bbe06319c9a..d3887e1c876 100644 --- a/src/core/user.conf.in +++ b/src/core/user.conf.in @@ -1,14 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# You can override the directives in this file by creating files in -# /etc/systemd/user.conf.d/*.conf. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See systemd-user.conf(5) for details +# See systemd-user.conf(5) for details. [Manager] #LogLevel=info diff --git a/src/coredump/coredump.conf b/src/coredump/coredump.conf index c2f0643e039..738c45bed25 100644 --- a/src/coredump/coredump.conf +++ b/src/coredump/coredump.conf @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See coredump.conf(5) for details. diff --git a/src/home/homed.conf b/src/home/homed.conf index 1b5dbedabd5..86b6266895c 100644 --- a/src/home/homed.conf +++ b/src/home/homed.conf @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See homed.conf(5) for details +# See homed.conf(5) for details. [Home] #DefaultStorage= diff --git a/src/journal-remote/journal-remote.conf.in b/src/journal-remote/journal-remote.conf.in index edc3abab4b0..1e4c3b9710f 100644 --- a/src/journal-remote/journal-remote.conf.in +++ b/src/journal-remote/journal-remote.conf.in @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See journal-remote.conf(5) for details +# See journal-remote.conf(5) for details. [Remote] # Seal=false diff --git a/src/journal-remote/journal-upload.conf.in b/src/journal-remote/journal-upload.conf.in index 5f59a6fe804..7d2bdc75018 100644 --- a/src/journal-remote/journal-upload.conf.in +++ b/src/journal-remote/journal-upload.conf.in @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See journal-upload.conf(5) for details +# See journal-upload.conf(5) for details. [Upload] # URL= diff --git a/src/journal/journald.conf b/src/journal/journald.conf index 2e1aacd8c55..ee674ebefed 100644 --- a/src/journal/journald.conf +++ b/src/journal/journald.conf @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See journald.conf(5) for details. diff --git a/src/login/logind.conf.in b/src/login/logind.conf.in index 8b220267f3a..800c452a60f 100644 --- a/src/login/logind.conf.in +++ b/src/login/logind.conf.in @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See logind.conf(5) for details. diff --git a/src/network/networkd.conf b/src/network/networkd.conf index 5339e5e5eda..4850ba61f2f 100644 --- a/src/network/networkd.conf +++ b/src/network/networkd.conf @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See networkd.conf(5) for details +# See networkd.conf(5) for details. [Network] #SpeedMeter=no diff --git a/src/oom/oomd.conf b/src/oom/oomd.conf index bd6a9391c6e..59e3416bf35 100644 --- a/src/oom/oomd.conf +++ b/src/oom/oomd.conf @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See oomd.conf(5) for details diff --git a/src/pstore/pstore.conf b/src/pstore/pstore.conf index 93a8b6707cc..7b7b1e84932 100644 --- a/src/pstore/pstore.conf +++ b/src/pstore/pstore.conf @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See pstore.conf(5) for details. diff --git a/src/resolve/resolved.conf.in b/src/resolve/resolved.conf.in index e1d06c0fb19..33187618e5c 100644 --- a/src/resolve/resolved.conf.in +++ b/src/resolve/resolved.conf.in @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See resolved.conf(5) for details +# See resolved.conf(5) for details. [Resolve] # Some examples of DNS servers which may be used for DNS= and FallbackDNS=: diff --git a/src/sleep/sleep.conf b/src/sleep/sleep.conf index dc2ed37f708..7c04072d42d 100644 --- a/src/sleep/sleep.conf +++ b/src/sleep/sleep.conf @@ -1,15 +1,16 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # -# See systemd-sleep.conf(5) for details +# See systemd-sleep.conf(5) for details. [Sleep] #AllowSuspend=yes diff --git a/src/timesync/timesyncd.conf.in b/src/timesync/timesyncd.conf.in index f91c034a013..8a9a14cf0c7 100644 --- a/src/timesync/timesyncd.conf.in +++ b/src/timesync/timesyncd.conf.in @@ -1,13 +1,14 @@ # This file is part of systemd. # -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. +# systemd is free software; you can redistribute it and/or modify it under the +# terms of the GNU Lesser General Public License as published by the Free +# Software Foundation; either version 2.1 of the License, or (at your option) +# any later version. # -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. +# Entries in this file show the compile time defaults. Local configuration +# should be created by either modifying this file, or by creating "drop-ins" in +# the system.conf.d/ subdirectory. The latter is generally recommended. +# Defaults can be restored by simply deleting this file and all drop-ins. # # See timesyncd.conf(5) for details.