From f0fa5c8e91e7be6bea9bd57e5a7975095e6f3f1b Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Mon, 27 May 2019 14:46:49 +0800 Subject: [PATCH] kdumpctl: check for ssh path availability when rebuild Currently kdumpctl rebuild will simply rebuild the initramfs, and only perform basic config syntax check. But it should also check if the target path is available when using SSH target, else kdump may fail. is second kernel. kdumpctl rebuild should cover this case, and create the path if it doesn't exist. This patch make rebuild and restart behaves the same, rebuild is now equal to restart, except it won't check config change or reload kdump resource. Signed-off-by: Kairui Song Acked-by: Dave Young --- kdumpctl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kdumpctl b/kdumpctl index bb61415..a1a6ee2 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1174,6 +1174,12 @@ rebuild() { return 1 fi + if check_ssh_config; then + if ! check_ssh_target; then + return 1 + fi + fi + setup_initrd if [ $? -ne 0 ]; then return 1