]> git.ipfire.org Git - thirdparty/dracut.git/commit
crypt-loop: Fix decrypt when running at info log level 44/head
authorJames Lee <jlee@thestaticvoid.com>
Wed, 25 Mar 2015 20:57:41 +0000 (16:57 -0400)
committerJames Lee <jlee@thestaticvoid.com>
Thu, 26 Mar 2015 03:31:24 +0000 (23:31 -0400)
commitc902aba0d48b56053a754f98af88c03a65de06e5
tree15b2a60cf3c0aee56b3ece7c83bf7ecda6b92ec1
parent2bc5054a64465d8d15f2670a8cc49e0795f33228
crypt-loop: Fix decrypt when running at info log level

When booting with 'rd.info', the 'info' statements in the crypt-loop
module's 'loop_decrypt' function are output to stdout along with the key
that gets piped into the 'cryptsetup' command, which causes the crypt
device unlocking to fail.

There are two possible simple solutions to this problem:

1. Redirect the info messages to stderr (just add '>&2' at the end of
the info statements).

or

2. Remove the info statements altogether.

I have tested both and they both work, but this commit implements #2.
The existing info messages are long (they overflow 80 characters
easily) and redundant (the password prompt clearly indicates what is
happening), and just generally not useful.  Given that no one has
reported or fixed this bug in the three years that this module has
existed, no one will miss these info messages.

The commit also changes an error message in the same function to be more
descriptive.
modules.d/91crypt-loop/crypt-loop-lib.sh