From 98c3aeba5838be2a072725e65354aa94b09bc9ea Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Tue, 2 Mar 2021 16:15:57 -0500 Subject: initrd: improve console logging --- src/initrd/common.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/initrd/common.sh') diff --git a/src/initrd/common.sh b/src/initrd/common.sh index 0f72efe..8f4e101 100644 --- a/src/initrd/common.sh +++ b/src/initrd/common.sh @@ -55,16 +55,24 @@ bootmenu() { local do_trigger="$1" no_panic="$2" killall dynmenu || true + clear >/dev/tty7 || true + + if [ "$do_trigger" ] + then + echo -n 'Attempting to restart menu after failed boot...' >/dev/tty7 + chvt 7 && sleep 1 || true + fi + if TERM=linux 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 + + if [ $? != 0 -a ! "$no_panic" ] + then panic "error loading boot menu! the system won't be usable :(" fi -- cgit v1.2.3