Systemd reports a conflict when kdump calls reboot during booting
because it tries to stop services while they are starting up.
Adding -f for reboot (halt, poweroff) will make systemd reboot
immediately without the step to stop services, which is safe enough
since we have manually called sync after dumping.
Signed-off-by: Dangyi Liu <dliu(a)redhat.com>
---
kdump-lib-initramfs.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index 68a94e8..724fff5 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -6,14 +6,14 @@ KDUMP_PATH="/var/crash"
CORE_COLLECTOR=""
DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31"
DMESG_COLLECTOR="/sbin/vmcore-dmesg"
-DEFAULT_ACTION="reboot"
+DEFAULT_ACTION="reboot -f"
DATEDIR=`date +%Y-%m-%d-%T`
HOST_IP='127.0.0.1'
DUMP_INSTRUCTION=""
SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa"
KDUMP_SCRIPT_DIR="/kdumpscripts"
DD_BLKSIZE=512
-FINAL_ACTION="reboot"
+FINAL_ACTION="reboot -f"
KDUMP_CONF="/etc/kdump.conf"
KDUMP_PRE=""
KDUMP_POST=""
@@ -57,13 +57,13 @@ get_kdump_confs()
DEFAULT_ACTION="kdump_emergency_shell"
;;
reboot)
- DEFAULT_ACTION="reboot"
+ DEFAULT_ACTION="reboot -f"
;;
halt)
- DEFAULT_ACTION="halt"
+ DEFAULT_ACTION="halt -f"
;;
poweroff)
- DEFAULT_ACTION="poweroff"
+ DEFAULT_ACTION="poweroff -f"
;;
dump_to_rootfs)
DEFAULT_ACTION="dump_to_rootfs"
--
2.5.0