mirror of
https://git.sr.ht/~nabijaczleweli/tzpfms
synced 2025-04-21 09:47:35 +03:00
Fix dracut+plymouth
This commit is contained in:
parent
fc7a475106
commit
e2ccaa4f3b
initrd
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user