* Removed dropbear_initrd_encrypt leftovers. They were conflicting with mkinitcpio-utils and mkinitcpio-netconf.
This commit is contained in:
parent
3842d352b2
commit
b4d7a8f1ec
2 changed files with 0 additions and 32 deletions
|
@ -16,7 +16,4 @@ run_cleanuphook ()
|
|||
if [ -f /var/run/dropbear.pid ]; then
|
||||
kill `cat /var/run/dropbear.pid`
|
||||
fi
|
||||
. /ip_opts
|
||||
/sbin/ip addr flush dev "$device"
|
||||
/sbin/ip link set down "$device"
|
||||
}
|
||||
|
|
|
@ -53,10 +53,6 @@ generate_keys() {
|
|||
done
|
||||
}
|
||||
|
||||
make_etc_passwd() {
|
||||
echo 'root:x:0:0:root:/:/bin/cryptsetup_shell' > "${TMPDIR}"/passwd
|
||||
}
|
||||
|
||||
build ()
|
||||
{
|
||||
#
|
||||
|
@ -82,37 +78,15 @@ build ()
|
|||
copy_openssh_keys || generate_keys
|
||||
display_fingerprints
|
||||
|
||||
[ -e "${TMPDIR}/passwd" ] && ( grep -q -e '^root:' "${TMPDIR}/passwd" ) || make_etc_passwd
|
||||
|
||||
add_checked_modules "/drivers/net/"
|
||||
add_binary "rm"
|
||||
add_binary "killall"
|
||||
add_binary "dropbear"
|
||||
|
||||
cat <<SCRIPTEOF > ${TMPDIR}/cryptsetup_shell
|
||||
#!/bin/sh
|
||||
if [ -c "/dev/mapper/control" ]; then
|
||||
if eval /sbin/cryptsetup luksOpen \`cat /.cryptdev\` \`cat /.cryptname\` \`cat /.cryptargs\` ; then
|
||||
echo > /.done
|
||||
killall cryptsetup
|
||||
fi
|
||||
else
|
||||
echo "encryption bootup not succeeded. please wait!"
|
||||
fi
|
||||
SCRIPTEOF
|
||||
|
||||
chmod a+x ${TMPDIR}/cryptsetup_shell
|
||||
|
||||
add_file "${TMPDIR}/cryptsetup_shell" "/bin/cryptsetup_shell"
|
||||
|
||||
echo '/bin/cryptsetup_shell' > "${TMPDIR}"/shells
|
||||
add_file "${TMPDIR}/shells" "/etc/shells"
|
||||
|
||||
cat /etc/dropbear/root_key > "${TMPDIR}"/authorized_keys
|
||||
|
||||
add_dir "/.ssh"
|
||||
add_file "${TMPDIR}/authorized_keys" "/.ssh/authorized_keys"
|
||||
add_file "${TMPDIR}/passwd" "/etc/passwd"
|
||||
add_full_dir "/etc/dropbear"
|
||||
add_file "/lib/libnss_files.so.2"
|
||||
add_dir "/var/run"
|
||||
|
@ -122,10 +96,7 @@ SCRIPTEOF
|
|||
add_file "${TMPDIR}/lastlog" "/var/log/lastlog"
|
||||
|
||||
# cleanup
|
||||
rm "${TMPDIR}/cryptsetup_shell"
|
||||
rm "${TMPDIR}/shells"
|
||||
rm "${TMPDIR}/authorized_keys"
|
||||
rm "${TMPDIR}/passwd"
|
||||
rm "${TMPDIR}/lastlog"
|
||||
|
||||
add_runscript
|
||||
|
|
Loading…
Reference in a new issue