diff --git a/dropbear_hook b/dropbear_hook index 18131f1..6a9bae7 100644 --- a/dropbear_hook +++ b/dropbear_hook @@ -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" } diff --git a/dropbear_install b/dropbear_install index 1285a24..df8e84a 100644 --- a/dropbear_install +++ b/dropbear_install @@ -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 < ${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