[pkg-cryptsetup-devel] Bug#597583: Bug#597583: initramfs-tools
jonas at freesources.org
Thu May 19 19:24:24 UTC 2011
Sorry for the late reply, I just didn't have time to take a look
earlier. In fact I considered several times to apply your proposed
change, but now I realized that this is not an option ...
On 21/09/2010 Ian Jackson wrote:
> It would be nice if the "keyscript" cryptopts option could specify a
> program to be found on the PATH (eg, in the initramfs's /bin) rather
> than an absolute filename.
> This could be done by replacing this test
> if [ -n "$cryptkeyscript" ] && [ ! -x "$cryptkeyscript" ]; then
> with something like
> if ! type "$cryptkeyscript >/dev/null; then
> with the added benefit of getting a slightly better error message too.
While I like your idea, it doesn't work. $cryptkeyscript might contain a
whole commandline, with arguments and options as well. Actually the
initramfs cryproot script even does it that way. See line 270 of the
cryptkeyscript="plymouth ask-for-password --prompt"
That one clearly doesn't work with type, as type checks for all
arguments, and errors out for the second and third one.
One might for sure add another test which searchs for $keyscript in
$PATH in case none of the earlier checks succeeded, but I don't like
that idea very much.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: Digital signature
More information about the pkg-cryptsetup-devel