summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/auto
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/auto')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto36
1 files changed, 29 insertions, 7 deletions
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index a609e06..cd49021 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -93,24 +93,46 @@ fi
rm $PATH_FSTAB
touch $PATH_FSTAB
-dialog --backtitle "FreeBSD Installer" --title "Partitioning" --extra-button \
- --extra-label "Manual" --ok-label "Guided" --cancel-label "Shell" \
- --yesno "Would you like to use the guided partitioning tool (recommended for beginners) or to set up partitions manually (experts)? You can also open a shell and set up partitions entirely by hand." 0 0
+PMODES="\
+Guided \"Partitioning Tool (Recommended for Beginners)\" \
+Manual \"Manually Configure Partitions (Expert)\" \
+Shell \"Open a shell and partition by hand\""
+
+CURARCH=$( uname -m )
+case $CURARCH in
+ amd64|i386) # Booting ZFS Supported
+ PMODES="$PMODES ZFS \"Automatic Root-on-ZFS (Experimental)\""
+ ;;
+ *) # Booting ZFS Unspported
+ ;;
+esac
-case $? in
-0) # Guided
+exec 3>&1
+PARTMODE=`echo $PMODES | xargs dialog --backtitle "FreeBSD Installer" \
+ --title "Partitioning" \
+ --menu "How would you like to partition your disk?" \
+ 0 0 0 2>&1 1>&3`
+if [ $? -eq $DIALOG_CANCEL ]; then exit 1; fi
+exec 3>&-
+
+case "$PARTMODE" in
+"Guided") # Guided
bsdinstall autopart || error
bsdinstall mount || error
;;
-1) # Shell
+"Shell") # Shell
clear
echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'."
sh 2>&1
;;
-3) # Manual
+"Manual") # Manual
bsdinstall partedit || error
bsdinstall mount || error
;;
+"ZFS") # ZFS
+ bsdinstall zfsboot || error
+ bsdinstall mount || error
+ ;;
*)
error
;;
OpenPOWER on IntegriCloud