Merge pull request #184 from jesa7955/fix_ssh_issue

95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs
master
Harald Hoyer 2016-11-30 13:28:36 +01:00 committed by GitHub
commit d4793cdbdb
1 changed files with 10 additions and 3 deletions

View File

@ -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