Browse Source

Merge pull request #184 from jesa7955/fix_ssh_issue

95ssh-client: attempt to copy UserKnownHostsFile to kdump's initramfs
master
Harald Hoyer 8 years ago committed by GitHub
parent
commit
d4793cdbdb
  1. 11
      modules.d/95ssh-client/module-setup.sh

11
modules.d/95ssh-client/module-setup.sh

@ -45,9 +45,16 @@ inst_sshenv() @@ -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…
Cancel
Save