From: Harald Hoyer Date: Mon, 12 Jul 2010 14:16:39 +0000 (+0200) Subject: crypt: wait for all rd_LUKS_UUID disks to appear X-Git-Tag: 007~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9ef52b460b9f1ef4f2d5b294baa5e45dc22d788;p=thirdparty%2Fdracut.git crypt: wait for all rd_LUKS_UUID disks to appear Also give a hint in emergency, if one disk is not found. --- diff --git a/modules.d/90crypt/parse-crypt.sh b/modules.d/90crypt/parse-crypt.sh index 775617fff..04d9ecb2b 100755 --- a/modules.d/90crypt/parse-crypt.sh +++ b/modules.d/90crypt/parse-crypt.sh @@ -9,9 +9,12 @@ else } > /etc/udev/rules.d/70-luks.rules LUKS=$(getargs rd_LUKS_UUID=) if [ -n "$LUKS" ]; then + echo '. /lib/dracut-lib.sh' > /emergency/crypt.sh for luksid in $LUKS; do printf 'ENV{ID_FS_TYPE}=="crypto_LUKS", ENV{ID_FS_UUID}=="*%s*", RUN+="/sbin/initqueue --unique --onetime --name cryptroot-ask-%%k /sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}"\n' $luksid \ >> /etc/udev/rules.d/70-luks.rules + printf '[ -e /dev/disk/by-uuid/*%s* ] || exit 1 \n' $luksid >> /initqueue-finished/crypt.sh + printf '[ -e /dev/disk/by-uuid/*%s* ] || warn "crypto LUKS UUID "%s" not found" \n' $luksid $luksid >> /emergency/00-crypt.sh done else echo 'ENV{ID_FS_TYPE}=="crypto_LUKS", RUN+="/sbin/initqueue --unique --onetime --name cryptroot-ask-%k /sbin/cryptroot-ask $env{DEVNAME} luks-$env{ID_FS_UUID}"' \