From cdec2e76b4b1af00e10ce3bb72ee74e33d52083b Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 8 May 2015 17:14:13 +0200 Subject: Make the encrypted installation work with Jessie. --- src/fripost-partman-udeb/base.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/fripost-partman-udeb') diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh index 23fcdeb..0155569 100644 --- a/src/fripost-partman-udeb/base.sh +++ b/src/fripost-partman-udeb/base.sh @@ -364,16 +364,14 @@ fripost_encrypt() { rm -f "$keyfile" # We are on a ramdisk, so it's good enough to unlink(2) # Add an entry to the crypttab - printf "%-15s %-41s %-15s %s\n" \ - "$name" UUID=$(/bin/block-attr --uuid "$device") none luks \ - >> /tmp/crypttab + fripost_crypttab_addentry "$name" "$device" none luks local m _ [ -d /var/lib/fripost ] || mkdir /var/lib/fripost # The modules required to fire up dropbear and start cryptsetup in the ramdisk. - echo dm_crypt > /tmp/initramfs-modules + echo dm_crypt >> /var/lib/fripost/initrd-modules while read m _; do /sbin/modinfo -F filename "$m"; done < /proc/modules \ - | sed -nr "s@^/lib/modules/`uname -r`/kernel/((arch/[^/]+/)?crypto|drivers/(ata|scsi))(/.*)?/([^/]+)\.ko\$@\5@p" \ + | sed -nr "s@^/lib/modules/`uname -r`/kernel/((arch/[^/]+/)?crypto|drivers/(ata|scsi|net))(/.*)?/([^/]+)\.ko\$@\5@p" \ >> /var/lib/fripost/initrd-modules /bin/apt-install busybox cryptsetup || true @@ -381,6 +379,12 @@ fripost_encrypt() { } +fripost_crypttab_addentry() { + local name="$1" uuid=$(/bin/block-attr --uuid "$2") keyfile="$3" options="$4" + printf "%-15s %-41s %-15s %s\n" "$name" "UUID=$uuid" "$keyfile" "$options" >>/tmp/crypttab +} + + # Like ssh-keygen -lf, but for a file such as authorized_keys, which # may contain multiple keys. Also, use the comment associated with the # key rather than the filename. -- cgit v1.2.3