summaryrefslogtreecommitdiffstats
path: root/tmpfiles.d
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-11-21 10:12:56 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2024-11-21 18:32:46 +0100
commit5ca9149464c100548701ab0839712c57f67e2652 (patch)
tree01ff2243cb5026d1c73ce85850d44e65f08b049c /tmpfiles.d
parentuser-record: don't synthesize default list of self-modfiable fields for non-r... (diff)
downloadsystemd-5ca9149464c100548701ab0839712c57f67e2652.tar.xz
systemd-5ca9149464c100548701ab0839712c57f67e2652.zip
tmpfiles: narrow scope of HAVE_SYSV_COMPAT condition for legacy.conf
That file contains a bunch of entries of which only some are related to SysV. The rest are just "traditional APIs" that need to stay. In particular, /var/lock a.k.a. /run/lock is used by many programs (LVM, iscsi, alsactl). Similarly, the README about /var/log is something that should stay as long as we have people migrating from older systems or using the copiuos documentation that mentions /var/log/messages.txt on the Internet. /var/lock/subsys is only used by sysvinit, and our code to support /forcefsck, /fastboot, and /forcequotacheck is conditionalized on HAVE_SYSV_COMPAT, so conditionalize those here on HAVE_SYSV_COMPAT too.
Diffstat (limited to 'tmpfiles.d')
-rw-r--r--tmpfiles.d/legacy.conf.in9
-rw-r--r--tmpfiles.d/meson.build2
2 files changed, 6 insertions, 5 deletions
diff --git a/tmpfiles.d/legacy.conf.in b/tmpfiles.d/legacy.conf.in
index ec2f7aea72..5bc58f5df1 100644
--- a/tmpfiles.d/legacy.conf.in
+++ b/tmpfiles.d/legacy.conf.in
@@ -7,8 +7,9 @@
# See tmpfiles.d(5) for details
-# These files are considered legacy and are unnecessary on legacy-free
-# systems.
+# The functionality provided by these files and directories has been replaced
+# by newer interfaces. Their use is discouraged on legacy-free systems. This
+# configuration is provided to maintain backward compatibility.
d /run/lock 0755 root root -
L /var/lock - - - - ../run/lock
@@ -16,15 +17,15 @@ L /var/lock - - - - ../run/lock
L$ /var/log/README - - - - ../..{{DOC_DIR}}/README.logs
{% endif %}
+{% if HAVE_SYSV_COMPAT %}
# /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems.
-
d /run/lock/subsys 0755 root root -
# /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and
# 'quotacheck.mode=force'
-
r! /forcefsck
r! /fastboot
r! /forcequotacheck
+{% endif %}
diff --git a/tmpfiles.d/meson.build b/tmpfiles.d/meson.build
index 0fe5bfc89f..19eb6d9c99 100644
--- a/tmpfiles.d/meson.build
+++ b/tmpfiles.d/meson.build
@@ -35,7 +35,7 @@ in_files = [
['20-systemd-stub.conf', 'ENABLE_EFI'],
['20-systemd-userdb.conf', 'ENABLE_SSH_USERDB_CONFIG'],
['etc.conf'],
- ['legacy.conf', 'HAVE_SYSV_COMPAT'],
+ ['legacy.conf'],
['static-nodes-permissions.conf'],
['systemd.conf'],
['var.conf'],