rc.local revision 219181
1238376Simp#!/bin/sh 2238376Simp# $FreeBSD: head/release/rc.local 219181 2011-03-02 16:06:57Z nwhitehorn $ 3238376Simp 4238376Simp: ${DIALOG_OK=0} 5238376Simp: ${DIALOG_CANCEL=1} 6238376Simp: ${DIALOG_HELP=2} 7238376Simp: ${DIALOG_EXTRA=3} 8238376Simp: ${DIALOG_ITEM_HELP=4} 9238376Simp: ${DIALOG_ESC=255} 10238376Simp 11238376SimpTERM=xterm; export TERM # XXX: serial consoles 12238376Simp 13238376Simpdialog --backtitle "FreeBSD Installer" --title "Welcome" --extra-button --extra-label "Shell" --ok-label "Install" --cancel-label "Live CD" --yesno "Welcome to FreeBSD! Would you like to begin an installation or use the live CD?" 0 0 14238376Simp 15238376Simpcase $? in 16238376Simp$DIALOG_OK) # Install 17238376Simp BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT 18238376Simp trap true SIGINT # Ignore cntrl-C here 19238376Simp bsdinstall 20238376Simp dialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete! The system will now reboot." 0 0 21238376Simp reboot 22238376Simp ;; 23238376Simp$DIALOG_CANCEL) # Live CD 24238376Simp exit 0 25238376Simp ;; 26238376Simp$DIALOG_EXTRA) # Shell 27238376Simp clear 28238376Simp echo "When finished, type 'exit' to return to the installer." 29238376Simp /bin/sh 30238376Simp . /etc/rc.local 31238376Simp ;; 32238376Simpesac 33238376Simp 34238376Simp