From cdec2e76b4b1af00e10ce3bb72ee74e33d52083b Mon Sep 17 00:00:00 2001
From: Guilhem Moulin <guilhem@fripost.org>
Date: Fri, 8 May 2015 17:14:13 +0200
Subject: Make the encrypted installation work with Jessie.

---
 src/fripost-postinst-udeb/finish-install.d/07fripost | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

(limited to 'src/fripost-postinst-udeb')

diff --git a/src/fripost-postinst-udeb/finish-install.d/07fripost b/src/fripost-postinst-udeb/finish-install.d/07fripost
index e583d5a..90df7b8 100755
--- a/src/fripost-postinst-udeb/finish-install.d/07fripost
+++ b/src/fripost-postinst-udeb/finish-install.d/07fripost
@@ -109,19 +109,10 @@ if [ "$encrypt" = true ]; then
         port=$(/target/usr/bin/od -An -N2 -i /dev/urandom)
         port=$(( $port % ($max + 1 - $min) + $min ))
     fi
-    # See dropbear(8) for the list of options. Failure to read a keyfile
-    # makes dropbear disable the corresponding algorithm (including
-    # key-based authentication), in our case DSS/DSA.
-    # XXX This is a dirty fix for bug #614981
+
+    # See dropbear(8) for the list of options.
     log "Changing dropbear's options; port $port"
-    sed -i "s@^\s*/sbin/dropbear\$@& -d '' -sgjk -p $port@" \
-        /target/usr/share/initramfs-tools/scripts/init-premount/dropbear
-
-    # Sadly /usr/lib/finish-install.d/10update-initramfs only updates
-    # the ramdisk if both cryptsetup *and* console-setup are installed.
-    # (Cf. #694156 and #696773.) So we perform the update manually here.
-    progress "Generating new initramfs image"
-    /bin/in-target /usr/sbin/update-initramfs -u -t
+    echo "PKGOPTION_dropbear_OPTION=\"-sgjk -p $port\"" >>/target/etc/initramfs-tools/initramfs.conf
 fi
 
 
-- 
cgit v1.2.3