Early kdump inherits the settings of normal kdump, so any changes that
caused normal kdump rebuilding also require rebuilding the system initramfs
to make sure that the changes take effect for early kdump.
Therefore, when the early kdump is enabled, provide a prompt message during
the rebuild of kdump initramfs.
Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
---
kdumpctl | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 75eebacef92b..09ede5857fb2 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -549,6 +549,16 @@ check_system_modified()
return 0
}
+check_earlykdump_is_enabled()
+{
+ rc=`grep -w "rd.earlykdump" /proc/cmdline`
+ if [ -n "$rc" ]; then
+ return 1
+ fi
+
+ return 0
+}
+
check_rebuild()
{
local extra_modules
@@ -628,6 +638,10 @@ check_rebuild()
fi
echo "Rebuilding $TARGET_INITRD"
+ check_earlykdump_is_enabled
+ if [ $? -eq 1 ]; then
+ echo "Tips: If early kdump is enabled, also require rebuilding the system
initramfs to ensure that the changes take effect for early kdump."
+ fi
rebuild_initrd
return $?
}
@@ -1140,6 +1154,10 @@ rebuild() {
fi
echo "Rebuilding $TARGET_INITRD"
+ check_earlykdump_is_enabled
+ if [ $? -eq 1 ]; then
+ echo "Tips: If early kdump is enabled, also require rebuilding the system
initramfs to ensure that the changes take effect for early kdump."
+ fi
rebuild_initrd
return $?
}
--
2.17.1
Show replies by date