From b2dabfa3ea5e950879c720ddff6a68126f0ac97b Mon Sep 17 00:00:00 2001 From: Kris Moore Date: Tue, 15 Oct 2013 15:28:43 -0400 Subject: [PATCH] Add ability to boot into text-install mode, and add new dialog menu options to walk through the install wizard / edit / install menus --- overlays/install-overlay/boot/grub/grub.cfg | 6 +-- .../boot/grub/themes/pcbsd/theme.txt | 2 +- overlays/install-overlay/root/PCBSDStart.sh | 2 +- overlays/install-overlay/root/PCBSDtext.sh | 43 +++++++++++++++++-- overlays/install-overlay/root/functions.sh | 6 +++ 5 files changed, 51 insertions(+), 8 deletions(-) diff --git a/overlays/install-overlay/boot/grub/grub.cfg b/overlays/install-overlay/boot/grub/grub.cfg index cfd111ce1..382646d1e 100644 --- a/overlays/install-overlay/boot/grub/grub.cfg +++ b/overlays/install-overlay/boot/grub/grub.cfg @@ -68,7 +68,7 @@ loadfont ($root)/boot/grub/themes/pcbsd/dejavu_bold_14.pf2 insmod png set theme=($root)/boot/grub/themes/pcbsd/theme.txt export theme -set timeout=10 +set timeout=15 menuentry "Graphical Install" { kfreebsd /boot/kernel/kernel @@ -77,7 +77,7 @@ menuentry "Graphical Install" { set kFreeBSD.kern.geom.eli.visible_passphrase=2 } -menuentry "Run X in VESA mode" { +menuentry "Graphical Install - (Failsafe VESA mode)" { kfreebsd /boot/kernel/kernel kfreebsd_loadenv /boot/device.hints set kFreeBSD.vfs.root.mountfrom=cd9660:/dev/iso9660/PCBSD_INSTALL @@ -85,7 +85,7 @@ menuentry "Run X in VESA mode" { set kFreeBSD.xvesa=YES } -menuentry "Emergency Console" { +menuentry "Text Install / Emergency Console" { kfreebsd /boot/kernel/kernel kfreebsd_loadenv /boot/device.hints set kFreeBSD.vfs.root.mountfrom=cd9660:/dev/iso9660/PCBSD_INSTALL diff --git a/overlays/install-overlay/boot/grub/themes/pcbsd/theme.txt b/overlays/install-overlay/boot/grub/themes/pcbsd/theme.txt index 7c86106e5..bb0afff0e 100644 --- a/overlays/install-overlay/boot/grub/themes/pcbsd/theme.txt +++ b/overlays/install-overlay/boot/grub/themes/pcbsd/theme.txt @@ -22,7 +22,7 @@ # THE SOFTWARE. #general settings -title-text: "PC-BSD Bootloader" +title-text: "PC-BSD / TrueOS Installation" title-font: "DejaVu Sans Bold 14" title-color: "#000" message-font: "DejaVu Sans Regular 12" diff --git a/overlays/install-overlay/root/PCBSDStart.sh b/overlays/install-overlay/root/PCBSDStart.sh index 531ad5f7a..cdd25268f 100755 --- a/overlays/install-overlay/root/PCBSDStart.sh +++ b/overlays/install-overlay/root/PCBSDStart.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright 2007 PC-BSD Software +# Copyright 2013 PC-BSD Software # http://www.pcbsd.com # Author: Kris Moore ########################################################################### diff --git a/overlays/install-overlay/root/PCBSDtext.sh b/overlays/install-overlay/root/PCBSDtext.sh index 2b0fe1bc4..f4522e646 100755 --- a/overlays/install-overlay/root/PCBSDtext.sh +++ b/overlays/install-overlay/root/PCBSDtext.sh @@ -1,22 +1,59 @@ #!/bin/sh # PC-BSD System Install Menu -# Copyright 2007 PC-BSD Software +# Copyright 2013 PC-BSD Software # http://www.pcbsd.com # Author: Kris Moore ########################################################################### +. /root/functions.sh + +text_install_menu() +{ + + while : + do + if [ -e "/tmp/sys-install.cfg" ] ; then + dialog --title "PC-BSD Text Install" --menu "Please select from the following options:" 20 55 15 wizard "Re-Run install wizard" edit "Edit install script" install "Start installation" back "Return to previous menu" 2>/tmp/answer + else + dialog --title "PC-BSD Text Install" --menu "Please select from the following options:" 20 55 15 wizard "Run install wizard" back "Return to previous menu" 2>/tmp/answer + fi + + ANS="`cat /tmp/answer`" + + case $ANS in + wizard) pc-installdialog + rtn + ;; + edit) vi /tmp/sys-install.cfg + rtn + ;; + install) echo "This will begin the installation, continue?" + echo -e "(y/n)\c" + read tmp + if [ "$tmp" = "y" -o "$tmp" = "Y" ] ; then + pc-sysinstall -c /tmp/sys-install.cfg + rtn + fi + ;; + back) break ;; + *) ;; + esac + done +} + DRES="1024x768" while i="1" do -dialog --title "PC-BSD Installation Menu" --menu "Please select from the following options:" 20 55 15 install "Start graphical install" vesa "Start graphical install (VESA)" utility "System Utilities" reboot "Reboot the system" 2>/tmp/answer +dialog --title "PC-BSD Installation Menu" --menu "Please select from the following options:" 20 55 15 install "Start text install" xorg "Start graphical install" vesa "Start graphical install (VESA)" utility "System Utilities" reboot "Reboot the system" 2>/tmp/answer ANS="`cat /tmp/answer`" case $ANS in - install) echo "Starting PC-BSD System Installer.. Please wait.." + install) text_install_menu ;; + xinstall) echo "Starting PC-BSD System Installer.. Please wait.." startx 2>/tmp/Xerrors ;; vesa) echo "Starting PC-BSD System Installer.. Please wait.." cp /root/cardDetect/XF86Config.compat /etc/X11/xorg.conf diff --git a/overlays/install-overlay/root/functions.sh b/overlays/install-overlay/root/functions.sh index b7ce7e697..13f9bee37 100755 --- a/overlays/install-overlay/root/functions.sh +++ b/overlays/install-overlay/root/functions.sh @@ -67,3 +67,9 @@ start_xorg() fi } + +rtn() +{ + echo "Press ENTER to continue" + read tmp +}