rc.local revision 219181
1219181Snwhitehorn#!/bin/sh 2219181Snwhitehorn# $FreeBSD: head/release/rc.local 219181 2011-03-02 16:06:57Z nwhitehorn $ 3219181Snwhitehorn 4219181Snwhitehorn: ${DIALOG_OK=0} 5219181Snwhitehorn: ${DIALOG_CANCEL=1} 6219181Snwhitehorn: ${DIALOG_HELP=2} 7219181Snwhitehorn: ${DIALOG_EXTRA=3} 8219181Snwhitehorn: ${DIALOG_ITEM_HELP=4} 9219181Snwhitehorn: ${DIALOG_ESC=255} 10219181Snwhitehorn 11219181SnwhitehornTERM=xterm; export TERM # XXX: serial consoles 12219181Snwhitehorn 13219181Snwhitehorndialog --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 14219181Snwhitehorn 15219181Snwhitehorncase $? in 16219181Snwhitehorn$DIALOG_OK) # Install 17219181Snwhitehorn BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT 18219181Snwhitehorn trap true SIGINT # Ignore cntrl-C here 19219181Snwhitehorn bsdinstall 20219181Snwhitehorn dialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete! The system will now reboot." 0 0 21219181Snwhitehorn reboot 22219181Snwhitehorn ;; 23219181Snwhitehorn$DIALOG_CANCEL) # Live CD 24219181Snwhitehorn exit 0 25219181Snwhitehorn ;; 26219181Snwhitehorn$DIALOG_EXTRA) # Shell 27219181Snwhitehorn clear 28219181Snwhitehorn echo "When finished, type 'exit' to return to the installer." 29219181Snwhitehorn /bin/sh 30219181Snwhitehorn . /etc/rc.local 31219181Snwhitehorn ;; 32219181Snwhitehornesac 33219181Snwhitehorn 34