From c4ae080dfdefb0eb175f0ffa202411190ab41b8f Mon Sep 17 00:00:00 2001 From: Zach Dykstra Date: Sat, 18 Jan 2025 14:01:44 -0600 Subject: [PATCH] early-setup.d/: create generic hook, console-init now dracut only People building with mkinitcpio still benefit from triggering a screen size recalculation. Move that to an early hook that's run for all frameworks. Fixes #706 --- zfsbootmenu/hooks/early-setup.d/10-generic-efi-init.sh | 6 ++++++ .../{10-console-init.sh => 20-dracut-console-init.sh} | 4 ---- .../{20-console-autosize.sh => 30-console-autosize.sh} | 0 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100755 zfsbootmenu/hooks/early-setup.d/10-generic-efi-init.sh rename zfsbootmenu/hooks/early-setup.d/{10-console-init.sh => 20-dracut-console-init.sh} (85%) rename zfsbootmenu/hooks/early-setup.d/{20-console-autosize.sh => 30-console-autosize.sh} (100%) diff --git a/zfsbootmenu/hooks/early-setup.d/10-generic-efi-init.sh b/zfsbootmenu/hooks/early-setup.d/10-generic-efi-init.sh new file mode 100755 index 000000000..240d5009b --- /dev/null +++ b/zfsbootmenu/hooks/early-setup.d/10-generic-efi-init.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# print an "empty" string to the screen to force it to recalculate +# with out this, EFI frame buffers will possibly have the wrong size + +echo -e "\033[0;30m ... \033[0m" diff --git a/zfsbootmenu/hooks/early-setup.d/10-console-init.sh b/zfsbootmenu/hooks/early-setup.d/20-dracut-console-init.sh similarity index 85% rename from zfsbootmenu/hooks/early-setup.d/10-console-init.sh rename to zfsbootmenu/hooks/early-setup.d/20-dracut-console-init.sh index 41e25328f..af1b0f1ab 100755 --- a/zfsbootmenu/hooks/early-setup.d/10-console-init.sh +++ b/zfsbootmenu/hooks/early-setup.d/20-dracut-console-init.sh @@ -23,9 +23,5 @@ fi # There is nothing to do without a valid control_term device [ -c "${control_term}" ] || exit 0 -# print an "empty" string to the screen to force it to recalculate -# with out this, EFI frame buffers will possibly have the wrong size -echo -e "\033[0;30m ... \033[0m" - # Try to initialize the console /lib/udev/console_init "${control_term##*/}" >/dev/null 2>&1 diff --git a/zfsbootmenu/hooks/early-setup.d/20-console-autosize.sh b/zfsbootmenu/hooks/early-setup.d/30-console-autosize.sh similarity index 100% rename from zfsbootmenu/hooks/early-setup.d/20-console-autosize.sh rename to zfsbootmenu/hooks/early-setup.d/30-console-autosize.sh