dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
6f381c
From ce6531045b337c3f793d1d74f1e5641e658805bb Mon Sep 17 00:00:00 2001
6f381c
From: Lennart Poettering <lennart@poettering.net>
6f381c
Date: Fri, 5 Apr 2019 18:22:31 +0200
6f381c
Subject: [PATCH] units: automatically revert to /run logging on shutdown if
6f381c
 necessary
6f381c
6f381c
Fixes: #867
6f381c
(cherry picked from commit 1e187d2dd52cbb4f0bb30e4d96acf7f72a145b91)
6f381c
6f381c
Resolves: #1873540
6f381c
---
6f381c
 units/systemd-journal-flush.service.in | 1 +
6f381c
 1 file changed, 1 insertion(+)
6f381c
6f381c
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
6f381c
index 439f5f3f76..653dcebe0e 100644
6f381c
--- a/units/systemd-journal-flush.service.in
6f381c
+++ b/units/systemd-journal-flush.service.in
6f381c
@@ -19,6 +19,7 @@ RequiresMountsFor=/var/log/journal
6f381c
 
6f381c
 [Service]
6f381c
 ExecStart=@rootbindir@/journalctl --flush
6f381c
+ExecStop=@rootbindir@/journalctl --smart-relinquish-var
6f381c
 Type=oneshot
6f381c
 RemainAfterExit=yes
6f381c
 TimeoutSec=90s