From 6261b8418846d9132e3055ea53d1a95b90b35ce4 Mon Sep 17 00:00:00 2001 From: Joerg Schirottke Date: Fri, 29 Apr 2016 13:00:50 +0200 Subject: special handling for installs with crypttab --- backend/modules/bootloader | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/modules/bootloader b/backend/modules/bootloader index c4f366c..629f9b5 100644 --- a/backend/modules/bootloader +++ b/backend/modules/bootloader @@ -82,6 +82,15 @@ function install_grub() { rm -f $TARGET/boot/vmlinuz $TARGET/boot/System.map $TARGET/boot/initrd.img + # special handling for installs with crypttab - option was changed in some grub versions + if grep -q -v -e ^\s*$ -e ^# $TARGET/etc/crypttab; then + if grep -q GRUB_CRYPTODISK_ENABLE $TARGET/usr/sbin/grub-install; then + echo GRUB_CRYPTODISK_ENABLE=y | tee -a /etc/default/grub >> $TARGET/etc/default/grub + elif grep -q GRUB_ENABLE_CRYPTODISK $TARGET/usr/sbin/grub-install; then + echo GRUB_ENABLE_CRYPTODISK=y | tee -a /etc/default/grub >> $TARGET/etc/default/grub + fi + fi + apple=0 dmidecode -s system-manufacturer | grep -q "Apple Inc." && apple=1 -- cgit v1.0