-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path0005-journal-flush-var-kmsg-after-starting-disable-kmsg-f.patch
52 lines (44 loc) · 2.08 KB
/
0005-journal-flush-var-kmsg-after-starting-disable-kmsg-f.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 171aa03057891537bc034e103138f371ce1f9f08 Mon Sep 17 00:00:00 2001
From: Dimitri John Ledkov <[email protected]>
Date: Tue, 23 Jun 2015 11:38:31 +0100
Subject: [PATCH 05/38] journal: flush var/kmsg after starting, disable kmsg
from boot.
---
src/journal/journald-server.c | 4 +++-
src/journal/journald.c | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 18e3c18b8e..04a99dcfc0 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -2329,7 +2329,9 @@ int server_init(Server *s, const char *namespace) {
return r;
/* By default, only read from /dev/kmsg if are the main namespace */
- s->boot_kmsg = s->read_kmsg = !s->namespace;
+ s->read_kmsg = !s->namespace;
+ /* default in clearlinux is to not read kmsg from boot at all. Use BootKMsg=true in journald.conf instead if you need this */
+ s->boot_kmsg = false;
s->storage = s->namespace ? STORAGE_PERSISTENT : STORAGE_AUTO;
journal_reset_metrics(&s->system_storage.metrics);
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 3d4044295e..a60e34d7a6 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -53,8 +53,6 @@ int main(int argc, char *argv[]) {
goto finish;
server_vacuum(&server, false);
- server_flush_to_var(&server, true);
- server_flush_dev_kmsg(&server);
if (server.namespace)
log_debug("systemd-journald running as PID "PID_FMT" for namespace '%s'.", getpid_cached(), server.namespace);
@@ -66,6 +64,9 @@ int main(int argc, char *argv[]) {
LOG_MESSAGE("Journal started"),
NULL);
+ server_flush_to_var(&server, true);
+ server_flush_dev_kmsg(&server);
+
/* Make sure to send the usage message *after* flushing the
* journal so entries from the runtime journals are ordered
* before this message. See #4190 for some details. */
--
2.36.1