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 kasong@redhat.com --- 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
On 10/18/2019 02:14 PM, Kairui Song wrote:
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 kasong@redhat.com
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
LGTM, Acked-by: Pingfan Liu piliu@redhat.com