From: Franck Bui Date: Mon, 21 Aug 2023 14:48:42 +0000 (+0200) Subject: Reflect the fact that main config files can be installed in /usr X-Git-Tag: v255-rc1~484^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c76f2fb0e59340222ce21f85c17d384c114db9de;p=thirdparty%2Fsystemd.git Reflect the fact that main config files can be installed in /usr --- diff --git a/man/standard-conf.xml b/man/standard-conf.xml index f02b9b0594e..c4f28778642 100644 --- a/man/standard-conf.xml +++ b/man/standard-conf.xml @@ -42,11 +42,12 @@ Configuration Directories and Precedence 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, as described - below. Using drop-ins for local configuration is recommended over modifications to the main configuration - file. + necessary to deviate from those defaults. The main configuration file is either in + /usr/lib/systemd or /etc/systemd/ and contains commented out + entries showing the defaults as a guide to the administrator. Local overrides can be created by creating + drop-ins, as described below. The main configuration file can also be edited for this purpose (or a copy + in /etc if it's shipped in /usr) however 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/, @@ -62,7 +63,9 @@ who may use this logic to override the configuration files installed by vendor packages. Drop-ins have to be used to override package drop-ins, since the main configuration file has lower precedence. It is recommended to prefix all filenames in those subdirectories with a two-digit number and a dash, to - simplify the ordering of the files. + simplify the ordering of the files. This also defined a concept of drop-in priority to allow + distributions to ship drop-ins within a specific range lower than the range used by users. This should + lower the risk of package drop-ins overriding accidentally drop-ins defined by users. To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/, with the diff --git a/src/core/system.conf.in b/src/core/system.conf.in index 309c7500f80..812531fe8b2 100644 --- a/src/core/system.conf.in +++ b/src/core/system.conf.in @@ -6,9 +6,11 @@ # any later version. # # 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. +# should be created by either modifying this file (or a copy of it placed in +# /etc if the original file is shipped in /usr), or by creating "drop-ins" in +# /etc/systemd/system.conf.d/ directory. The latter is generally recommended. +# Defaults can be restored by simply deleting the main configuration file and +# all drop-ins located in /etc. # # Use 'systemd-analyze cat-config systemd/system.conf' to display the full config. #