summaryrefslogtreecommitdiffstats
path: root/units
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2021-12-01 08:51:48 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-06 11:47:27 +0100
commitd5ee050ffc9d413253932d9340ade8c8fb111092 (patch)
treeaeae996bd628dc92f05bbd4d63f6d333c15e0d8e /units
parentsystemctl: support JSON output for "show-environment" (diff)
downloadsystemd-d5ee050ffc9d413253932d9340ade8c8fb111092.tar.xz
systemd-d5ee050ffc9d413253932d9340ade8c8fb111092.zip
journal: don't remove the flushed flag when journald is stopped
Due to the fact that systemd-journal-flush.service has "Requires=systemd-journald.service", this service is stopped too when journald is requested to do so. However stopping systemd-journal-flush.service implies that journald relinquishes /var hence implicitly switching back to the volatile storage mode and removing /run/systemd/journal/flushed. If journald is started afterwards, it will run in volatile storage mode regardless of the value of 'Storage=' as it believes now that /var is not yet ready (because the flushed flag is missing). Because this flag is mainly an indication for journald that the initialization of /var/log/journal (during the boot process) has been done, systemd-journal-flush.service shouldn't be tied to the state of journald itself but to the state of /var/log/journal, hence to the state of the system.
Diffstat (limited to 'units')
-rw-r--r--units/systemd-journal-flush.service1
1 files changed, 0 insertions, 1 deletions
diff --git a/units/systemd-journal-flush.service b/units/systemd-journal-flush.service
index 6423f6ea80..6efb8734a7 100644
--- a/units/systemd-journal-flush.service
+++ b/units/systemd-journal-flush.service
@@ -11,7 +11,6 @@
Description=Flush Journal to Persistent Storage
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
-Requires=systemd-journald.service
After=systemd-journald.service systemd-remount-fs.service
Before=systemd-tmpfiles-setup.service
RequiresMountsFor=/var/log/journal