From 4aef8c9e30d4c14c801a50aa94eed983ab4ae2c5 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 8 May 2015 17:23:03 +0200 Subject: Jessie fixups. --- .../finish-install.d/07fripost | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/fripost-postinst-udeb/finish-install.d/07fripost') diff --git a/src/fripost-postinst-udeb/finish-install.d/07fripost b/src/fripost-postinst-udeb/finish-install.d/07fripost index bacb910..d4e05bb 100755 --- a/src/fripost-postinst-udeb/finish-install.d/07fripost +++ b/src/fripost-postinst-udeb/finish-install.d/07fripost @@ -47,6 +47,17 @@ progress "Generating public/private rsa key pair (OpenSSH)" -C "${sshHostKey#/target}" -f "${sshHostKey#/target}" +####################################################################### +# Change initramfs defaults + +sed -ri -e 's/^#?\s*MODULES=.*/MODULES=dep/' \ + -e 's/^#?\s*COMPRESS=.*/COMPRESS=xz/' \ + /target/etc/initramfs-tools/initramfs.conf + +sed -nr '/^\s*(\S+)\s+\S+\s+swap\s.*/ {s//RESUME=\1/p;q}' /target/etc/fstab \ + >> /target/etc/initramfs-tools/conf.d/resume + + ####################################################################### # Put dropbear in the initrd if full disk encryption is desired. @@ -175,11 +186,6 @@ cat > "$dpkg_remove" <<- EOF wamerican wbritish EOF -# XXX: the dummy package 'module-init-tools' is a dependency for 'acpid'. -#/usr/sbin/chroot /target /usr/bin/dpkg-query \ -# --show --showformat='${binary:Package} ${binary:Summary}\n' \ -# | sed -rn 's/^(\S+)\s.*\btransitional dummy package\b.*/\1/p' \ -# >> "$dpkg_remove" /bin/in-target /usr/bin/xargs -a"${dpkg_remove#/target}" \ debconf-apt-progress --no-progress -- apt-get -y autoremove --purge rm -f "$dpkg_remove" @@ -225,16 +231,16 @@ else db_subst "$template" PORT "$port" # Convert the key to OpenSSH format, so we can use ssh-keygen - sshHostKey2=$(mktemp) + sshPubKey2=$(mktemp) /usr/sbin/chroot /target /usr/bin/dropbearkey -y \ -f /etc/initramfs-tools/etc/dropbear/dropbear_rsa_host_key \ - | grep -E '^(ssh-(dss|rsa)|ecdsa-sha2-nistp(256|384|521))' > "$sshHostKey2" - db_subst "$template" SSHFPR_INITRD "$(/usr/bin/ssh-keygen -lf $sshHostKey2)" - rm -f "$sshHostKey2" + | grep -E '^(ssh-(dss|rsa|ed25519)|ecdsa-sha2-nistp(256|384|521))' > "$sshPubKey2" + db_subst "$template" SSHFPR_INITRD "$(sshfprs $sshPubKey2)" + rm -f "$sshPubKey2" fi db_subst "$template" USER "$user" db_subst "$template" IPv4 "$(getIPv4)" -db_subst "$template" SSHFPR_SERVER "$(/usr/bin/ssh-keygen -lf $sshHostKey)" +db_subst "$template" SSHFPR_SERVER "$(sshfprs ${sshHostKey}.pub)" db_subst "$template" SSHFPR_AUTHORIZED "$(sshfprs $import/authorized_keys ' - ')" db_get fripost/final-notice -- cgit v1.2.3