kdumpctl: bail out immediately if host key verification failed

In kdump.conf, if sshkey points to an invalid ssh key, 'kdumpctl restart'
can bail out immediately instead of retry.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Pingfan Liu 2019-10-17 14:01:14 +08:00 committed by Kairui Song
parent e7a207d166
commit 72ed97683f

View File

@ -755,7 +755,7 @@ check_and_wait_network_ready()
fi
# if server removes the authorized_keys or, no /root/.ssh/kdump_id_rsa
echo $errmsg | grep -q "Permission denied\|No such file or directory"
echo $errmsg | grep -q "Permission denied\|No such file or directory\|Host key verification failed"
if [ $? -eq 0 ]; then
echo "Could not create $DUMP_TARGET:$SAVE_PATH, you probably need to run \"kdumpctl propagate\"" >&2
return 1