diff options
author | Michal Vasilek <michal@vasilek.cz> | 2021-06-26 05:43:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 05:43:25 +0000 |
commit | f20fb199e60722abc052b6034bddb6b83d870c99 (patch) | |
tree | a495b601eacd6a8eeccf22f67f22fc78787048c5 | |
parent | 2084e9f7483a50f63ea8efbf3708fa82dcc85e86 (diff) | |
download | src-f20fb199e60722abc052b6034bddb6b83d870c99.tar.gz src-f20fb199e60722abc052b6034bddb6b83d870c99.zip |
Fix plymouth passphrase prompt with dracut
plymouth --command splits the command on spaces which means
that zfs-load-key was getting the filesystem name enclosed
in single quotes (since 13c59bb76) and failing. This commit
fixes it by piping the password directly to the command
similar to how it's done in other scripts (initramfs,
dracut without plymouth).
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Michal Vasilek <michal@vasilek.cz>
Related-to: #9193
Related-to: #9202
Closes #12147
-rwxr-xr-x | contrib/dracut/90zfs/zfs-lib.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in index 10b0b701a233..defc0bfc8e76 100755 --- a/contrib/dracut/90zfs/zfs-lib.sh.in +++ b/contrib/dracut/90zfs/zfs-lib.sh.in @@ -179,8 +179,8 @@ ask_for_password() { # Prompt for password with plymouth, if installed and running. if plymouth --ping 2>/dev/null; then plymouth ask-for-password \ - --prompt "$ply_prompt" --number-of-tries="$ply_tries" \ - --command="$ply_cmd" + --prompt "$ply_prompt" --number-of-tries="$ply_tries" | \ + eval "$ply_cmd" ret=$? else if [ "$tty_echo_off" = yes ]; then |