diff --git a/initrd/dracut/tzpfms-load-key.sh b/initrd/dracut/tzpfms-load-key.sh index 4055564..c56cc3b 100755 --- a/initrd/dracut/tzpfms-load-key.sh +++ b/initrd/dracut/tzpfms-load-key.sh @@ -36,18 +36,16 @@ fi # ideally, we'd only clear the screen if we were making the switch, but not if the user was already switched to the log output. # Instead, clear if there's a "quiet", leave alone otherwise, and always restore; # cmdline option "plymouth.ignore-show-splash" can be used to disable splashes altogether, if desired. +# +# There's a similar but distinct version of both of these in initramfs-tools/zfs-patch.sh with_promptable_tty() { - echo "$@" > /dev/console if command -v plymouth > /dev/null && plymouth --ping; then - #plymouth hide-splash - plymouth deactivate - grep -q 'quiet' /proc/cmdline && printf '\033c' + plymouth hide-splash + grep -q 'quiet' /proc/cmdline && printf '\033c' > /dev/console "$@" < /dev/console > /dev/console 2>&1; ret="$?" - # TODO: some combination of all this does an absolute fucky wucky - plymouth reactivate???? - #plymouth show-splash + plymouth show-splash else # Mimic /scripts/zfs#decrypt_fs(): setting "printk" temporarily to "7" will allow prompt even if kernel option "quiet" printk="$(awk '{print $1}' /proc/sys/kernel/printk)" @@ -80,7 +78,5 @@ if [ "$(zpool list -H -o feature@encryption "$(echo "$BOOTFS" | awk -F/ '{print fi # Fall through to zfs-dracut's zfs-load-key.sh - with_promptable_tty zfs load-key "$ENCRYPTIONROOT" - exit fi fi diff --git a/initrd/initramfs-tools/hook b/initrd/initramfs-tools/hook index 3d78525..61bbac4 100755 --- a/initrd/initramfs-tools/hook +++ b/initrd/initramfs-tools/hook @@ -7,7 +7,7 @@ PREREQ="zfs" # Bit of a hack: replace zfs-intramfs' decrypt_fs() in /scripts/zfs with our version that understands tzpfms datasets, -# should be compatible with, other hooks doing the same thing +# which should be compatible with other hooks doing the same thing [ "${verbose:-n}" = "y" ] && echo "Patching /scripts/zfs" sed -Ei 's/^decrypt_fs\(\)/__tzpfms__&/' "$DESTDIR/scripts/zfs" cat /usr/share/tzpfms/initramfs-tools-zfs-patch.sh >> "$DESTDIR/scripts/zfs" diff --git a/initrd/initramfs-tools/zfs-patch.sh b/initrd/initramfs-tools/zfs-patch.sh index 55d79c5..405afd6 100644 --- a/initrd/initramfs-tools/zfs-patch.sh +++ b/initrd/initramfs-tools/zfs-patch.sh @@ -44,6 +44,8 @@ decrypt_fs() { # ideally, we'd only clear the screen if we were making the switch, but not if the user was already switched to the log output. # Instead, clear if there's a "quiet", leave alone otherwise, and always restore; # cmdline option "plymouth.ignore-show-splash" can be used to disable splashes altogether, if desired. +# +# There's a similar but distinct version of this and the code above in dracut/tzpfms-load-key.sh with_promptable_tty() { if command -v plymouth > /dev/null && plymouth --ping; then plymouth hide-splash