From 18ee888eab917cc1eb935f075a9b917e136a15f2 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Fri, 18 Oct 2019 14:10:15 +0800 Subject: [PATCH] mkdumprd: ensure ssh path exists before check size check_size checks if the specified dump path on the ssh target have enough space. And if the path doesn't exits, it will fail and exit. mkdir_save_path_ssh should be called first to check if the path exists, and create the path if it doesn't exits, so the size check can always work properly. Signed-off-by: Kairui Song Acked-by: Pingfan Liu --- mkdumprd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkdumprd b/mkdumprd index 50472a9..aafd808 100644 --- a/mkdumprd +++ b/mkdumprd @@ -429,10 +429,10 @@ do ssh) if strstr "$config_val" "@"; then - check_size ssh $config_val mkdir_save_path_ssh $config_val + check_size ssh $config_val add_dracut_module "ssh-client" - add_dracut_sshkey "$SSH_KEY_LOCATION" + add_dracut_sshkey "$SSH_KEY_LOCATION" else perror_exit "Bad ssh dump target $config_val" fi