Although "kdumpctl rebuild" is introduced to help user
rebuild the
initramfs without modifying the kdump.conf, if the kdump.conf is
modified and "kdumpctl rebuild" is called, a initramfs with a faulty
kdump.conf will be built.
Kdump will refuse to load the initramfs when restarted, but kdumpctl
reload may load the faulty initramfs. So need to make sure the faulty
build won't be generate in the first place.
Check for kdump.conf error before building the initramfs to ensure such
failure won't happen.
Signed-off-by: Kairui Song <kasong(a)redhat.com>
---
kdumpctl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 20afb30..bb61415 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1169,6 +1169,11 @@ stop()
}
rebuild() {
+ check_config
+ if [ $? -ne 0 ]; then
+ return 1
+ fi
+
setup_initrd
if [ $? -ne 0 ]; then
return 1
--
2.21.0
_______________________________________________
kexec mailing list -- kexec(a)lists.fedoraproject.org
To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org