From e28fcd0a7b79c09c9aeca61b643b2d5bffb68c20 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 2 Mar 2021 14:11:59 -0500 Subject: initrd: improve terminal and error handling for menu --- src/initrd/common.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/initrd/common.sh b/src/initrd/common.sh index 750fa87..af144df 100644 --- a/src/initrd/common.sh +++ b/src/initrd/common.sh @@ -54,12 +54,16 @@ samizdat_install_udev_rules() bootmenu() { local do_trigger="$1" no_panic="$2" - OpenVT -f -c 7 -- dynmenu "$MENUFIFO" && - chvt 7 && - menutitle 'Samizdat\n\nAs the Internet develops there are\ntransitions in the management arrangements.\nThe time has come to take\na small step in one of those transitions.' 'Choose an installation target.' -# menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.' - addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram" - addmenu "poweroff" "[ Shut down the system immediately ]" "poweroff -f" + killall dynmenu || true + if OpenVT -f -c 7 -s -- dynmenu "$MENUFIFO" + then + chvt 7 || true + clear || true + menutitle 'Samizdat\n\nAs the Internet develops there are\ntransitions in the management arrangements.\nThe time has come to take\na small step in one of those transitions.' 'Choose an installation target.' + # menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.' + addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram" + addmenu "poweroff" "[ Shut down the system immediately ]" "poweroff -f" + fi if [ $? != 0 -a ! "$no_panic" ]; then panic "error loading boot menu! the system won't be usable :(" fi -- cgit v1.2.3