From: Yu Watanabe Date: Fri, 24 May 2024 21:09:52 +0000 (+0900) Subject: unit: also stop systemd-journal-flush.service on soft-reboot X-Git-Tag: v256-rc4~118^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ae27cefd7340072aed83f391d788f2e7e14dce7;p=thirdparty%2Fsystemd.git unit: also stop systemd-journal-flush.service on soft-reboot After soft-reboot, /var/log/journal may be initially read-only, and becomes writable a bit later. In such case, runtime journal is initially opened by journald. Hence, we need to flush to /var when it is ready. --- diff --git a/units/systemd-journal-flush.service b/units/systemd-journal-flush.service index 13c3985ed3c..bd098e697b1 100644 --- a/units/systemd-journal-flush.service +++ b/units/systemd-journal-flush.service @@ -20,6 +20,9 @@ Wants=systemd-journald.service After=systemd-journald.service RequiresMountsFor=/var/log/journal +Before=soft-reboot.target systemd-soft-reboot.service +Conflicts=soft-reboot.target + [Service] ExecStart=journalctl --flush ExecStop=journalctl --smart-relinquish-var