rc.local revision 220500
1219181Snwhitehorn#!/bin/sh 2219181Snwhitehorn# $FreeBSD: head/release/rc.local 220500 2011-04-09 14:25:58Z 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 20220500Snwhitehorn if [ $? -eq 0 ]; then 21220500Snwhitehorn dialog --backtitle "FreeBSD Installer" --title "Complete" --yes-label "Reboot" --no-label "Live CD" --yesno "Installation of FreeBSD complete! Would you like to reboot into the installed system now?" 0 0 && reboot 22220500Snwhitehorn else 23220500Snwhitehorn . /etc/rc.local 24220500Snwhitehorn fi 25219181Snwhitehorn ;; 26219181Snwhitehorn$DIALOG_CANCEL) # Live CD 27219181Snwhitehorn exit 0 28219181Snwhitehorn ;; 29219181Snwhitehorn$DIALOG_EXTRA) # Shell 30219181Snwhitehorn clear 31219181Snwhitehorn echo "When finished, type 'exit' to return to the installer." 32219181Snwhitehorn /bin/sh 33219181Snwhitehorn . /etc/rc.local 34219181Snwhitehorn ;; 35219181Snwhitehornesac 36219181Snwhitehorn 37