* Removed dropbear_initrd_encrypt leftovers. They were conflicting with mkinitcpio-utils and mkinitcpio-netconf.

This commit is contained in:
Giancarlo Razzolini 2015-07-28 00:26:31 -03:00
parent 3842d352b2
commit b4d7a8f1ec
2 changed files with 0 additions and 32 deletions

View file

@ -16,7 +16,4 @@ run_cleanuphook ()
if [ -f /var/run/dropbear.pid ]; then if [ -f /var/run/dropbear.pid ]; then
kill `cat /var/run/dropbear.pid` kill `cat /var/run/dropbear.pid`
fi fi
. /ip_opts
/sbin/ip addr flush dev "$device"
/sbin/ip link set down "$device"
} }

View file

@ -53,10 +53,6 @@ generate_keys() {
done done
} }
make_etc_passwd() {
echo 'root:x:0:0:root:/:/bin/cryptsetup_shell' > "${TMPDIR}"/passwd
}
build () build ()
{ {
# #
@ -82,37 +78,15 @@ build ()
copy_openssh_keys || generate_keys copy_openssh_keys || generate_keys
display_fingerprints display_fingerprints
[ -e "${TMPDIR}/passwd" ] && ( grep -q -e '^root:' "${TMPDIR}/passwd" ) || make_etc_passwd
add_checked_modules "/drivers/net/" add_checked_modules "/drivers/net/"
add_binary "rm" add_binary "rm"
add_binary "killall" add_binary "killall"
add_binary "dropbear" 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 cat /etc/dropbear/root_key > "${TMPDIR}"/authorized_keys
add_dir "/.ssh" add_dir "/.ssh"
add_file "${TMPDIR}/authorized_keys" "/.ssh/authorized_keys" add_file "${TMPDIR}/authorized_keys" "/.ssh/authorized_keys"
add_file "${TMPDIR}/passwd" "/etc/passwd"
add_full_dir "/etc/dropbear" add_full_dir "/etc/dropbear"
add_file "/lib/libnss_files.so.2" add_file "/lib/libnss_files.so.2"
add_dir "/var/run" add_dir "/var/run"
@ -122,10 +96,7 @@ SCRIPTEOF
add_file "${TMPDIR}/lastlog" "/var/log/lastlog" add_file "${TMPDIR}/lastlog" "/var/log/lastlog"
# cleanup # cleanup
rm "${TMPDIR}/cryptsetup_shell"
rm "${TMPDIR}/shells"
rm "${TMPDIR}/authorized_keys" rm "${TMPDIR}/authorized_keys"
rm "${TMPDIR}/passwd"
rm "${TMPDIR}/lastlog" rm "${TMPDIR}/lastlog"
add_runscript add_runscript