summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlemens Nanni <contact@autoboot.org>2015-11-05 11:39:47 (EST)
committer Francis Rowe <info@gluglug.org.uk>2015-11-05 12:24:07 (EST)
commit03196594ba97c9b3a29e3ebf4f0ce1af218b80ee (patch)
tree9d36adb6b3b9917c3ab334451b7604c7a649c1c1
parent965b63da30cc3d73209e178dc4697abc7c7365a9 (diff)
downloadlibreboot-03196594ba97c9b3a29e3ebf4f0ce1af218b80ee.zip
libreboot-03196594ba97c9b3a29e3ebf4f0ce1af218b80ee.tar.gz
libreboot-03196594ba97c9b3a29e3ebf4f0ce1af218b80ee.tar.bz2
grub.cfg: Search for keyfile only once
-rw-r--r--resources/grub/config/menuentries/common.cfg10
1 files changed, 5 insertions, 5 deletions
diff --git a/resources/grub/config/menuentries/common.cfg b/resources/grub/config/menuentries/common.cfg
index c7a1bf7..4cebb39 100644
--- a/resources/grub/config/menuentries/common.cfg
+++ b/resources/grub/config/menuentries/common.cfg
@@ -34,14 +34,14 @@ menuentry 'Load Operating System (incl. fully encrypted disks) [O]' --hotkey='o
fi
done
done
+ # prompt user for passphrase if LUKS header is found but try using external keyfiles first
+ search -n -f /keyfile --set=kf --hint usb0, --hint usb1,
+ if [ $? = 0 ]; then
+ kf="-k (${kf})/keyfile ${d}"
+ fi
# (This way, we only need to scan for encrypted data once while covering every possible disk setup,
# be it LVM/BTRFS/ZFS/ext4/etc. (on LUKS) (on RAID) on/across raw devices/MBR/GPT
for d in ${devs}; do
- # prompt user for passphrase if LUKS header is found but try using external keyfiles first
- search -n -f /keyfile --set=kf --hint usb0, --hint usb1,
- if [ $? = 0 ]; then
- kf="-k (${kf})/keyfile ${d}"
- fi
cryptomount ${kf} ${d}
done
# 3. Do the same routine again, but for possibly decrypted data this time. There might be an LVM