Re: [PATCH 2/2] (wip) successfully unlocks LUKS devices from an encrypted loop file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Excerpts from leho's message of Wed Apr 27 10:30:12 +0200 2011:
> +            # Something seems to be locking our loop device
> +            while ! losetup -d $l; do
> +                sleep 0.5
> +            done 

What if it falls into infinite loop?  Anyway polling is not a good
thing.  You should do the same what is done when key for the device is
not found yet.  Notice what's done in âelse blockâ in cryptoroot-ask:

modules.d/90crypt/cryptoroot-ask.sh:
> if tmp=$(getkey /tmp/luks.keys $device); then
>     keydev="${tmp%%:*}"
>     keypath="${tmp#*:}"
> else
>     info "No key found for $device.  Will try later."
>     initqueue --unique --onetime --settled \
>         --name cryptroot-ask-$luksname \
>         $(command -v cryptroot-ask) "$@"
>     exit 0
> fi
-- 
Amadeusz ÅoÅnowski

PGP key fpr: C700 CEDE 0C18 212E 49DA  4653 F013 4531 E1DB FAB5

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux