From 4a0f9763c006152bb5c677b2cfa8c1bb0ca6a032 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Mon, 5 Aug 2019 14:34:04 +0800 Subject: [PATCH] Don't forward and drop journalctl logs for fadump fadump will alter the normal boot initramfs and we don't want a normal boot to foward and drop the journalctl logs. Signed-off-by: Kairui Song Acked-by: Dave Young --- dracut-module-setup.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 9ef6021..3fa696d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -839,9 +839,12 @@ install() { fi # Forward logs to console directly, this avoids unneccessary memory - # consumption and make console output more useful - mkdir -p ${initdir}/etc/systemd/journald.conf.d - echo "[Journal]" > ${initdir}/etc/systemd/journald.conf.d/kdump.conf - echo "Storage=none" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf - echo "ForwardToConsole=yes" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf + # consumption and make console output more useful. + # Only do so for non fadump image. + if ! is_fadump_capable; then + mkdir -p ${initdir}/etc/systemd/journald.conf.d + echo "[Journal]" > ${initdir}/etc/systemd/journald.conf.d/kdump.conf + echo "Storage=none" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf + echo "ForwardToConsole=yes" >> ${initdir}/etc/systemd/journald.conf.d/kdump.conf + fi }