summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-phosphor/systemd-policy
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2018-06-29 23:39:55 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-07-24 16:45:12 +0300
commite9722d1bee556ee4d69ff1a1221d629b6c7759ec (patch)
tree6af5120eda96e01cba3e995ccc7f30a086ffa4e8 /meta-phosphor/common/recipes-phosphor/systemd-policy
parent3e4d0942a9b093e201f9f343a43d106cd3733ed3 (diff)
downloadopenbmc-e9722d1bee556ee4d69ff1a1221d629b6c7759ec.tar.xz
Prevent duplicate kernel message in journal
OpenBMC uses busybox which uses klogd which causes duplicate kernel messages to show up in the journal due to syslog. This override prevents journald from reading from kmsg so only one instance of the kernel messages will show up in journald instead of the two of each currently put in the journal Tested: Verified only one instance of kernel messages were in the journal. Resolves openbmc/openbmc#2720 Change-Id: I434f48159990e7b068103e5c11ac3c9431112199 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/systemd-policy')
-rw-r--r--meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb5
-rw-r--r--meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy/disable-duplicate-kernel-msg.conf13
2 files changed, 18 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb b/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
index 34abf50088..ce58a532a4 100644
--- a/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
+++ b/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy.bb
@@ -8,8 +8,13 @@ LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d71
DEPENDS += "systemd"
SRC_URI = "file://service-restart-policy.conf"
+SRC_URI += "file://disable-duplicate-kernel-msg.conf"
+
FILES_${PN} += "${systemd_unitdir}/system.conf.d/service-restart-policy.conf"
+FILES_${PN} += "${systemd_unitdir}/journald.conf.d/disable-duplicate-kernel-msg.conf"
+
do_install() {
install -m 644 -D ${WORKDIR}/service-restart-policy.conf ${D}${systemd_unitdir}/system.conf.d/service-restart-policy.conf
+ install -m 644 -D ${WORKDIR}/disable-duplicate-kernel-msg.conf ${D}${systemd_unitdir}/journald.conf.d/disable-duplicate-kernel-msg.conf
}
diff --git a/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy/disable-duplicate-kernel-msg.conf b/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy/disable-duplicate-kernel-msg.conf
new file mode 100644
index 0000000000..beb2f445f9
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/systemd-policy/phosphor-systemd-policy/disable-duplicate-kernel-msg.conf
@@ -0,0 +1,13 @@
+# This file overrides some defaults for systemd
+#
+# OpenBMC uses busybox which uses klogd which causes duplicate
+# kernel messages to show up in the journal due to syslog.
+# This override prevents journald from reading from kmsg so
+# only one instance of the kernel messages will show up in
+# journald instead of the two of each currently put in the
+# journal
+#
+# See systemd-system.conf(5) for details on the conf files
+
+[Journal]
+ReadKMsg=no