From: Harald Hoyer Date: Fri, 29 Aug 2014 12:06:57 +0000 (+0200) Subject: ssh-client: handle /etc/ssh/ssh_config X-Git-Tag: 039~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a203398efebae7784f28e2885f61129ecdb30ad;p=thirdparty%2Fdracut.git ssh-client: handle /etc/ssh/ssh_config - disable ProxyCommand - install the GlobalKnownHostsFile https://bugzilla.redhat.com/show_bug.cgi?id=1086778 --- diff --git a/modules.d/95ssh-client/module-setup.sh b/modules.d/95ssh-client/module-setup.sh index f3ac6e971..36bfbc897 100755 --- a/modules.d/95ssh-client/module-setup.sh +++ b/modules.d/95ssh-client/module-setup.sh @@ -41,7 +41,15 @@ inst_sshenv() # Copy over root and system-wide ssh configs. [[ -f /root/.ssh/config ]] && inst_simple /root/.ssh/config - [[ -f /etc/ssh/ssh_config ]] && inst_simple /etc/ssh/ssh_config + if [[ -f /etc/ssh/ssh_config ]]; then + inst_simple /etc/ssh/ssh_config + sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc/ssh/ssh_config + while read key val; do + [[ key != "GlobalKnownHostsFile" ]] && continue + inst_simple "$val" + break + done < /etc/ssh/ssh_config + fi return 0 }