From d600083137ace3f008df9368b2f3213be2964fa9 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 20 Oct 2013 11:12:28 +0200 Subject: [PATCH] 00-crypt.sh: move /mnt/key to ${MNT_KEY} (variable local to file) --- defaults/initrd.d/00-crypt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/defaults/initrd.d/00-crypt.sh b/defaults/initrd.d/00-crypt.sh index 892c0ed..fd54da5 100755 --- a/defaults/initrd.d/00-crypt.sh +++ b/defaults/initrd.d/00-crypt.sh @@ -6,6 +6,7 @@ . /etc/initrd.d/00-fsdev.sh CRYPTSETUP_BIN="/sbin/cryptsetup" +KEY_MNT="/mnt/key" _bootstrap_key() { local ltype="${1}" @@ -13,7 +14,7 @@ _bootstrap_key() { eval local keyloc='"${CRYPT_'${ltype}'_KEY}"' - media_find "key" "${keyloc}" "CRYPT_${ltype}_KEYDEV" "/mnt/key" ${keydevs} + media_find "key" "${keyloc}" "CRYPT_${ltype}_KEYDEV" "${KEY_MNT}" ${keydevs} } _crypt_exec() { @@ -52,7 +53,7 @@ _open_luks() { local luks_name="${1}" local dev_error=0 key_error=0 keydev_error=0 - local mntkey="/mnt/key/" cryptsetup_opts="" + local mntkey="${KEY_MNT}/" cryptsetup_opts="" local real_dev= if [ "${ltype}" = "ROOT" ]; then