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 <kasong@redhat.com> Acked-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
parent
882b920c2f
commit
18ee888eab
4
mkdumprd
4
mkdumprd
@ -429,10 +429,10 @@ do
|
|||||||
ssh)
|
ssh)
|
||||||
if strstr "$config_val" "@";
|
if strstr "$config_val" "@";
|
||||||
then
|
then
|
||||||
check_size ssh $config_val
|
|
||||||
mkdir_save_path_ssh $config_val
|
mkdir_save_path_ssh $config_val
|
||||||
|
check_size ssh $config_val
|
||||||
add_dracut_module "ssh-client"
|
add_dracut_module "ssh-client"
|
||||||
add_dracut_sshkey "$SSH_KEY_LOCATION"
|
add_dracut_sshkey "$SSH_KEY_LOCATION"
|
||||||
else
|
else
|
||||||
perror_exit "Bad ssh dump target $config_val"
|
perror_exit "Bad ssh dump target $config_val"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user