summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-12-17 21:44:23 +0100
committerTony Hutter <[email protected]>2022-02-16 17:58:55 -0800
commit19a4bf445f415f3574ffdd1c7e511017e5c295b4 (patch)
tree9fa9bee3c20ddd714baba0d86f2b40ae983545c7 /contrib
parentf9baf968b8199095489d9bffb8f31549af8bf9d4 (diff)
contrib/initrd: systemd-ask-password --no-tty before argument
In systemd 249 (sid), sd-a-p processes its arguments in getopt + mode, so "systemd-ask-password zupa --no-tty" prompts for "zupa --no-tty", not "zupa" not on the tty, as expected (bullseye, 247). Ref: https://github.com/systemd/systemd/commit/4b1c842d95bfd6ab352ade1a4655f9e512f35185 Ref: https://github.com/systemd/systemd/pull/19806 Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12870
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/dracut/90zfs/zfs-load-key.sh.in2
-rw-r--r--contrib/initramfs/scripts/zfs2
2 files changed, 2 insertions, 2 deletions
diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in
index 2138ff943..c974b3d9e 100755
--- a/contrib/dracut/90zfs/zfs-load-key.sh.in
+++ b/contrib/dracut/90zfs/zfs-load-key.sh.in
@@ -45,7 +45,7 @@ if [ "$(zpool list -H -o feature@encryption "${BOOTFS%%/*}")" = 'active' ]; then
case "${KEYLOCATION%%://*}" in
prompt)
for _ in 1 2 3; do
- systemd-ask-password "Encrypted ZFS password for ${BOOTFS}" --no-tty | zfs load-key "${ENCRYPTIONROOT}" && break
+ systemd-ask-password --no-tty "Encrypted ZFS password for ${BOOTFS}" | zfs load-key "${ENCRYPTIONROOT}" && break
done
;;
http*)
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index 306e6e157..6e39f139d 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -420,7 +420,7 @@ decrypt_fs()
elif [ -e /run/systemd/system ]; then
echo "systemd-ask-password" > /run/zfs_console_askpwd_cmd
for _ in 1 2 3; do
- systemd-ask-password "Encrypted ZFS password for ${ENCRYPTIONROOT}" --no-tty | \
+ systemd-ask-password --no-tty "Encrypted ZFS password for ${ENCRYPTIONROOT}" | \
$ZFS load-key "${ENCRYPTIONROOT}" && break
done