Merge pull request #184 from jesa7955/fix_ssh_issue
95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfsmaster
commit
d4793cdbdb
|
@ -45,9 +45,16 @@ inst_sshenv()
|
|||
inst_simple /etc/ssh/ssh_config
|
||||
sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config
|
||||
while read key val || [ -n "$key" ]; do
|
||||
[[ $key != "GlobalKnownHostsFile" ]] && continue
|
||||
if [[ $key == "GlobalKnownHostsFile" ]]; then
|
||||
inst_simple "$val"
|
||||
break
|
||||
# Copy customized UserKnowHostsFile
|
||||
elif [[ $key == "UserKnownHostsFile" ]]; then
|
||||
# Make sure that ~/foo will be copied as /root/foo in kdump's initramfs
|
||||
if str_starts "$val" "~/"; then
|
||||
val="/root/${val#"~/"}"
|
||||
fi
|
||||
inst_simple "$val"
|
||||
fi
|
||||
done < /etc/ssh/ssh_config
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue