summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@cryptonomic.net>2021-03-02 14:11:59 -0500
committerAndrew Cady <d@cryptonomic.net>2021-03-02 14:11:59 -0500
commite28fcd0a7b79c09c9aeca61b643b2d5bffb68c20 (patch)
treeefc72307b19e0fff77a5822b98250cf2c910fbd0
parent6726860c3ee36e26ebae4fbc8b72c9955b50230f (diff)
initrd: improve terminal and error handling for menu
-rw-r--r--src/initrd/common.sh16
1 files 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()
54bootmenu() 54bootmenu()
55{ 55{
56 local do_trigger="$1" no_panic="$2" 56 local do_trigger="$1" no_panic="$2"
57 OpenVT -f -c 7 -- dynmenu "$MENUFIFO" && 57 killall dynmenu || true
58 chvt 7 && 58 if OpenVT -f -c 7 -s -- dynmenu "$MENUFIFO"
59 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.' 59 then
60# menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.' 60 chvt 7 || true
61 addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram" 61 clear || true
62 addmenu "poweroff" "[ Shut down the system immediately ]" "poweroff -f" 62 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.'
63 # menutitle 'Samizdat\nfreedom from surveillance\nno trusted authorities' 'Choose an installation target.'
64 addmenu "ramdisk" "[ Boot to RAM without installing anything ]" "menu-select boot-ram"
65 addmenu "poweroff" "[ Shut down the system immediately ]" "poweroff -f"
66 fi
63 if [ $? != 0 -a ! "$no_panic" ]; then 67 if [ $? != 0 -a ! "$no_panic" ]; then
64 panic "error loading boot menu! the system won't be usable :(" 68 panic "error loading boot menu! the system won't be usable :("
65 fi 69 fi