aboutsummaryrefslogtreecommitdiffstats
path: root/src/fripost-partman-udeb
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-05-08 17:14:13 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 04:28:18 +0200
commitcdec2e76b4b1af00e10ce3bb72ee74e33d52083b (patch)
tree34e49f062ea50d0428d56dfb93cc953fde940a6c /src/fripost-partman-udeb
parent61bb46a89b9f73055102b369451b6e64f63d45df (diff)
Make the encrypted installation work with Jessie.
Diffstat (limited to 'src/fripost-partman-udeb')
-rw-r--r--src/fripost-partman-udeb/base.sh14
1 files changed, 9 insertions, 5 deletions
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.