From f95264added35c25fb557931116edd3cd0aec7ba Mon Sep 17 00:00:00 2001 From: Marios Andreopoulos Date: Mon, 11 Jun 2012 19:17:49 +0200 Subject: [PATCH] Use real_root option for (plain) Luks setup --- defaults/initrd.scripts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 258f2bd..fd9ac27 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -751,16 +751,19 @@ openLUKS() { # please use 'tr' and this line, or remove it # eval local TYPE=`uppercase $1` + local LUKS_NAME="$1" + case $1 in root) local TYPE=ROOT + [ -n "${REAL_ROOT}" ] && local LUKS_NAME="$(echo "$REAL_ROOT" | sed -e 's/.*\///')" ;; swap) local TYPE=SWAP ;; esac - eval local LUKS_DEVICE='"${CRYPT_'${TYPE}'}"' LUKS_NAME="$1" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' LUKS_TRIM='"${CRYPT_'${TYPE}'_TRIM}"' + eval local LUKS_DEVICE='"${CRYPT_'${TYPE}'}"' LUKS_NAME="$LUKS_NAME" LUKS_KEY='"${CRYPT_'${TYPE}'_KEY}"' LUKS_KEYDEV='"${CRYPT_'${TYPE}'_KEYDEV}"' LUKS_TRIM='"${CRYPT_'${TYPE}'_TRIM}"' local DEV_ERROR=0 KEY_ERROR=0 KEYDEV_ERROR=0 local mntkey="/mnt/key/" cryptsetup_options='' -- 2.26.2