2 if getarg rd_NO_LUKS; then
3 info "rd_NO_LUKS: removing cryptoluks activation"
4 rm -f /etc/udev/rules.d/70-luks.rules
7 echo 'SUBSYSTEM!="block", GOTO="luks_end"'
8 echo 'ACTION!="add|change", GOTO="luks_end"'
9 } > /etc/udev/rules.d/70-luks.rules
10 LUKS=$(getargs rd_LUKS_UUID=)
11 if [ -n "$LUKS" ]; then
12 echo '. /lib/dracut-lib.sh' > /emergency/crypt.sh
13 for luksid in $LUKS; do
14 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 \
15 >> /etc/udev/rules.d/70-luks.rules
16 printf '[ -e /dev/disk/by-uuid/*%s* ] || exit 1 \n' $luksid >> /initqueue-finished/crypt.sh
17 printf '[ -e /dev/disk/by-uuid/*%s* ] || warn "crypto LUKS UUID "%s" not found" \n' $luksid $luksid >> /emergency/00-crypt.sh
20 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}"' \
21 >> /etc/udev/rules.d/70-luks.rules
23 echo 'LABEL="luks_end"' >> /etc/udev/rules.d/70-luks.rules