]>
git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/95ssh-client/module-setup.sh
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
5 # fixme: assume user is root
9 [[ $mount_needs ]] && return 1
11 # If our prerequisites are not met, fail.
12 require_binaries
ssh scp ||
return 1
14 if [[ $sshkey ]]; then
16 derror
"ssh key: $sshkey is not found!"
26 # We depend on network modules being loaded
32 if [ -d /root
/.
ssh ]; then
34 chmod 700 ${initdir}/root
/.
ssh
37 # Copy over ssh key and knowhosts if needed
40 [[ -f /root
/.ssh
/known_hosts
]] && inst_simple
/root
/.ssh
/known_hosts
41 [[ -f /etc
/ssh
/ssh_known_hosts
]] && inst_simple
/etc
/ssh
/ssh_known_hosts
44 # Copy over root and system-wide ssh configs.
45 [[ -f /root
/.ssh
/config
]] && inst_simple
/root
/.ssh
/config
46 [[ -f /etc
/ssh
/ssh_config
]] && inst_simple
/etc
/ssh
/ssh_config