From 4dcb7d2121561b938f04755a16872906edc5af99 Mon Sep 17 00:00:00 2001 From: t0b3 Date: Tue, 22 Oct 2013 23:47:22 +0200 Subject: [PATCH] Update 00-crypt.sh REAL_{ROOT,RESUME} value needs to be set for _open_luks to enable linking --- defaults/initrd.d/00-crypt.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/defaults/initrd.d/00-crypt.sh b/defaults/initrd.d/00-crypt.sh index 5f6bcb8..0a08a79 100755 --- a/defaults/initrd.d/00-crypt.sh +++ b/defaults/initrd.d/00-crypt.sh @@ -280,13 +280,12 @@ start_luks() { if [ -n "${CRYPT_ROOTS}" ]; then root_or_swap=1 - if _open_luks "root"; then - # force REAL_ROOT= to some value if not set - # this is mainly for backward compatibility, - # because grub2 always sets a valid root= - # and user must have it as well. - [ -z "${REAL_ROOT}" ] && REAL_ROOT="/dev/mapper/root" - fi + # force REAL_ROOT= to some value if not set + # this is mainly for backward compatibility, + # because grub2 always sets a valid root= + # and user must have it as well. + [ -z "${REAL_ROOT}" ] && REAL_ROOT="/dev/mapper/root" + _open_luks "root" fi [ -n "${CRYPT_SWAP_KEY}" ] && [ -z "${CRYPT_SWAP_KEYDEV}" ] \ @@ -294,10 +293,9 @@ start_luks() { if [ -n "${CRYPT_SWAPS}" ]; then root_or_swap=1 - if _open_luks "swap"; then - # force REAL_RESUME= to some value if not set - [ -z "${REAL_RESUME}" ] && REAL_RESUME="/dev/mapper/swap" - fi + # force REAL_RESUME= to some value if not set + [ -z "${REAL_RESUME}" ] && REAL_RESUME="/dev/mapper/swap" + _open_luks "swap" fi if [ -n "${root_or_swap}" ]; then