summaryrefslogtreecommitdiff
path: root/backend/modules/bootloader
diff options
context:
space:
mode:
authorJoerg Schirottke <master@kanotix.com>2016-04-29 13:00:50 +0200
committerHolger Paradies <retabell@gmx.de>2020-12-30 13:22:28 +0100
commit6261b8418846d9132e3055ea53d1a95b90b35ce4 (patch)
tree59992880f0b36a36a83d8a0eefdf1ddca783a04b /backend/modules/bootloader
parentf229dab22e4a1f9324d9127ea0548d1ead148880 (diff)
downloadacritoxinstaller-6261b8418846d9132e3055ea53d1a95b90b35ce4.zip
acritoxinstaller-6261b8418846d9132e3055ea53d1a95b90b35ce4.tar.gz
special handling for installs with crypttab
Diffstat (limited to 'backend/modules/bootloader')
-rw-r--r--backend/modules/bootloader9
1 files changed, 9 insertions, 0 deletions
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