summaryrefslogtreecommitdiffstats
path: root/release/rc.local
diff options
context:
space:
mode:
Diffstat (limited to 'release/rc.local')
-rwxr-xr-xrelease/rc.local25
1 files changed, 21 insertions, 4 deletions
diff --git a/release/rc.local b/release/rc.local
index 27b670f..d0b08c5 100755
--- a/release/rc.local
+++ b/release/rc.local
@@ -72,10 +72,23 @@ if [ -f /etc/installerconfig ]; then
exit
fi
-dialog --backtitle "pfSense Installer" --title "Welcome" --yes-label "Install" --no-label "Rescue Shell" --yesno "Welcome to pfSense! Would you like to begin an installation or use the Rescue Shell?" 0 0
+IOPTS="\
+\"Install\" \"Install pfSense\" \
+\"Rescue Shell\" \"Launch a shell prompt to perform rescue operations\""
-case $? in
-$DIALOG_OK) # Install
+if [ -x /root/recover_configxml.sh ] ; then
+ IOPTS="${IOPTS} \"Recover config.xml\" \"Recover config.xml from a previous installation\""
+fi
+
+exec 3>&1
+IMODE=`echo ${IOPTS} | xargs dialog --backtitle "pfSense Installer" \
+ --title "Welcome" \
+ --menu "Welcome to pfSense!" \
+ 0 0 0 2>&1 1>&3` || exit 1
+exec 3>&-
+
+case "$IMODE" in
+"Install") # Install
# If not netbooting, have the installer configure the network
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -eq 0 -a ! -f /etc/diskless ]; then
@@ -94,11 +107,15 @@ $DIALOG_OK) # Install
. /etc/rc.local
fi
;;
-$DIALOG_CANCEL) # Rescue Shell
+"Rescue Shell") # Rescue Shell
clear
echo "When finished, type 'exit' to return to the installer."
/bin/sh
. /etc/rc.local
;;
+"Recover config.xml") # Recover config.xml from a target drive
+ /root/recover_configxml.sh
+ . /etc/rc.local
+ ;;
esac
OpenPOWER on IntegriCloud