rc.local revision 219181
1#!/bin/sh
2# $FreeBSD: head/release/rc.local 219181 2011-03-02 16:06:57Z nwhitehorn $
3
4: ${DIALOG_OK=0}
5: ${DIALOG_CANCEL=1}
6: ${DIALOG_HELP=2}
7: ${DIALOG_EXTRA=3}
8: ${DIALOG_ITEM_HELP=4}
9: ${DIALOG_ESC=255}
10
11TERM=xterm; export TERM # XXX: serial consoles
12
13dialog --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
14
15case $? in
16$DIALOG_OK)	# Install
17	BSDINSTALL_CONFIGCURRENT=yes; export BSDINSTALL_CONFIGCURRENT
18	trap true SIGINT	# Ignore cntrl-C here
19	bsdinstall
20	dialog --backtitle "FreeBSD Installer" --title "Complete" --msgbox "Installation of FreeBSD complete! The system will now reboot." 0 0
21	reboot
22	;;
23$DIALOG_CANCEL)	# Live CD
24	exit 0
25	;;
26$DIALOG_EXTRA)	# Shell
27	clear
28	echo "When finished, type 'exit' to return to the installer."
29	/bin/sh
30	. /etc/rc.local
31	;;
32esac
33
34