<para>The default configuration is set during compilation, so configuration is only needed when it is
necessary to deviate from those defaults. The main configuration file is either in
- <filename>/usr/lib/systemd</filename> or <filename>/etc/systemd/</filename> and contains commented out
+ <filename>/usr/lib/systemd/</filename> or <filename>/etc/systemd/</filename> 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 <filename>/etc</filename> if it's shipped in <filename>/usr</filename>) however using drop-ins for
+ in <filename>/etc/</filename> if it's shipped in <filename>/usr/</filename>) however using drop-ins for
local configuration is recommended over modifications to the main configuration file.</para>
<para>In addition to the "main" configuration file, drop-in configuration snippets are read from
ntpservicelistdir = prefixdir / 'lib/systemd/ntp-units.d'
credstoredir = prefixdir / 'lib/credstore'
+configfiledir = get_option('configfiledir')
+if configfiledir == ''
+ configfiledir= sysconfdir
+endif
+pkgconfigfiledir = configfiledir / 'systemd'
+
docdir = get_option('docdir')
if docdir == ''
docdir = datadir / 'doc/systemd'
option('docdir', type : 'string',
description : 'documentation directory')
option('install-sysconfdir', type : 'combo', choices : ['true', 'no-samples', 'false'], value : 'true',
- description : 'install configuration files and directories to $sysconfdir')
+ description : 'install configuration files and directories')
+option('configfiledir', type : 'string', value : '',
+ description : 'directory for configuration files')
option('fallback-hostname', type : 'string', value : 'localhost',
description : 'the hostname used if none configured')
},
]
-in_files = [['system.conf', pkgsysconfdir],
- ['user.conf', pkgsysconfdir],
+in_files = [['system.conf', pkgconfigfiledir],
+ ['user.conf', pkgconfigfiledir],
['org.freedesktop.systemd1.policy', polkitpolicydir]]
foreach item : in_files
input : file + '.in',
output: file,
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
- install : (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no'),
+ install : (dir == pkgconfigfiledir) ? install_sysconfdir_samples : (dir != 'no'),
install_dir : dir)
endforeach
#
# Entries in this file show the compile time defaults. Local configuration
# 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/ 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.
+# all drop-ins located in /etc/.
#
# Use 'systemd-analyze cat-config systemd/system.conf' to display the full config.
#
# 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 user.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
+# the /etc/systemd/user.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/user.conf' to display the full config.
#
# See systemd-user.conf(5) for details.
# 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 coredump.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
+# the /etc/systemd/coredump.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/coredump.conf' to display the full config.
#
if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir_samples
install_data('coredump.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
# 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 homed.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
+# the /etc/systemd/homed.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/homed.conf' to display the full config.
#
if install_sysconfdir_samples
install_data('homed.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
endif
# 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 journal-remote.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
+# the /etc/systemd/journal-remote.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/journal-remote.conf' to display the full config.
#
# 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 journal-upload.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
+# the /etc/systemd/journal-upload.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/journal-upload.conf' to display the full config.
#
output: file,
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : tuple[1],
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endforeach
if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
# 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 journald.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
+# the /etc/systemd/journald.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/journald.conf' to display the full config.
#
if install_sysconfdir_samples
install_data('journald.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
if get_option('create-log-dirs')
# 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 logind.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
+# the /etc/systemd/logind.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/logind.conf' to display the full config.
#
output : 'logind.conf',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : enable_logind and install_sysconfdir_samples and pkgsysconfdir != 'no',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
custom_target(
'systemd-user',
if install_sysconfdir_samples
install_data('networkd.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
endif
# 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 networkd.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
+# the /etc/systemd/networkd.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/networkd.conf' to display the full config.
#
if install_sysconfdir_samples
install_data('oomd.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
endif
# 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 oomd.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
+# the /etc/systemd/oomd.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/oomd.conf' to display the full config.
#
if conf.get('ENABLE_PSTORE') == 1 and install_sysconfdir_samples
install_data('pstore.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
# 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 pstore.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
+# the /etc/systemd/pstore.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/pstore.conf' to display the full config.
#
output : 'resolved.conf',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_RESOLVE') == 1 and install_sysconfdir_samples,
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
# 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 resolved.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
+# the /etc/systemd/resolved.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/resolved.conf' to display the full config.
#
if install_sysconfdir_samples
install_data('sleep.conf',
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
endif
# 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 sleep.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
+# the /etc/systemd/sleep.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/sleep.conf' to display the full config.
#
output : 'timesyncd.conf',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
- install_dir : pkgsysconfdir)
+ install_dir : pkgconfigfiledir)
if conf.get('ENABLE_TIMESYNCD') == 1
install_data('org.freedesktop.timesync1.conf',
# 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 timesyncd.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
+# the /etc/systemd/timesyncd.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/timesyncd.conf' to display the full config.
#
# any later version.
#
# Entries in this file show the compile time defaults. Local configuration
-# should be created by either modifying this file. Defaults can be restored by
-# simply deleting this file.
+# 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
+# the /etc/udev/iocost.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 udev/iocost.conf' to display the full config.
#
if install_sysconfdir_samples
install_data('udev.conf',
- install_dir : sysconfdir / 'udev')
+ install_dir : configfiledir / 'udev')
install_data('iocost/iocost.conf',
- install_dir : sysconfdir / 'udev')
+ install_dir : configfiledir / 'udev')
endif
udev_pc = custom_target(
TrustedCertificateFile=/run/systemd/remote-pki/ca.crt
EOF
systemd-analyze cat-config systemd/journal-upload.conf
+mkdir -p /run/systemd/system/systemd-journal-upload.service.d
+cat >/run/systemd/system/systemd-journal-upload.service.d/99-test.conf <<EOF
+[Service]
+Restart=no
+EOF
+systemctl daemon-reload
setfacl -R -m "u:systemd-journal-upload:rwX" /run/systemd/journal-remote-tls
systemctl restart systemd-journal-upload