svn commit: r257842 - in head/usr.sbin/bsdinstall: . scripts

Devin Teske dteske at FreeBSD.org
Fri Nov 8 09:57:06 UTC 2013


Author: dteske
Date: Fri Nov  8 09:57:03 2013
New Revision: 257842
URL: http://svnweb.freebsd.org/changeset/base/257842

Log:
  A series of changes tested together as a whole:
  + Add a `-D FILE" command-line option for overriding the path to the
    bsdinstall log file (BSDINSTALL_LOG env var).
  + Document new `-D FILE' in the man page for bsdinstall.
  + If FILE in `-D FILE' begins with a +, debug output goes to stdout
    (interleaved between dialog(1) invocations/output) as well as to FILE
    (minus the leading + of course).
  + If BSDINSTALL_LOG cannot be written, then debugging is disabled (except in
    the case of a leading + in the pathname, wherein debug will still be
    printed to stdout).
  + Update source code formatting style.
  + Fix a dangling participle ("Begun ..." -> "Began ...")
  + Rewrite the docsinstall script (was necessary to abate direct dependency
    on BSDINSTALL_LOG (instead, use fault-tolerant bsdconfig framework which
    displays appropriate errors for package management).
  NB: docsinstall is still using pkg(8) after this change.
  + Add additional debug output for dhclient/rtsol/wpa_cliscan
  + Display script errors in a textbox rather than just on stdout
  + Update many coments.
  + Add new f_show_err() API call (like f_show_msg but changes the dialog
    title to "Error")(see bsdconfig's `common.subr').
  + Add new f_eval_catch() API call for executing a command via eval but not
    before logging the command to debug. Several example cases documented in
    API header for function in bsdconfig's `common.subr'.
  + Fix dialog auto-sizing when launched as an rvalue to a pipe for indirected
    scripts (previously would default to 24x80 sizing in this case, now it can
    autosize to full size even when in a pipe chain).
  + Fix bug in f_snprintf if $format argument began with "-"; printf would
    misinterpret as a flag. (this is in bsdcofig's `strings.subr').
  + Add accompanying f_sprintf() and f_vsprintf() to go along with already
    existing f_snprintf() and f_vsnprintf() (see bsdconfig's `strings.subr').
  + Remove some unnecessary default ZFS datasets from the automatic "zfsboot"
    script. Such as: /usr/ports/distfiles /usr/ports/packages /usr/obj /var/db
    /var/empty /var/mail and /var/run (these can all be created as-needed once
    the system is installed).
  + Remove setuid=off for /usr/home (as discussed from last round of CFT).
  + Fix some i18n string violations in "zfsboot".
  + Bolster debugging output in "zfsboot".
  + Fix some string quoting issues in "zfsboot".
  + Fix some variable scope issues in "zfsboot".
  + Change "Create" to "Install" in "zfsboot" main menu.
  + Increase error checking in "zfsboot" (type-check arguments and such).
  + Add call to "graid destroy" killing automatic metadata (part of the series
    of pedantic destructions we do when bootstrapping a new/naked disk).
  + Make judicious use of new f_eval_catch() in "zfsboot".
  + Fixup some variable names for consistency (zfsboot).
  + Fix an underride syntax parameter expansion folly (zfsboot).
  + Confirm layout if not explicitly chosen when blindly proceeding (no
    longer have to touch anything on the ZFS menu if it scares you, just
    choose the omnibus "Install" option at the top and you'll be prompted to
    select vdev type and disks in the layout confirmation dialog).
  + Change numbered menu items to alphabetic for more efficient navigation.
  + Consolidate vdev selection and disk selection into a single stateful
    menu which performs validation and allows backing out to each previous
    menu as you go deeper.
  + Redesign the ``Last Chance'' dialog (still using the same colors, but
    make it conform to a tolerable width and make disks appear in a block-
    quote style indented region).
  + Fix a bug wherein we used the a lowercase variable name by accident
    (actual variable name declared as all-uppercase) at the time of
    initializing fstab(5) (not believed to cause any issues though).
  + Update the geli setup infobox for each provider being initialized
    (not just at the onset -- since each ``geli init'' causes kernel messages
    to push our infobox off-screen).
  
  Reviewed by:	Allan Jude <freebsd at allanjude.com>
  Discussed on:	-current
  MFC after:	3 days

Modified:
  head/usr.sbin/bsdinstall/bsdinstall
  head/usr.sbin/bsdinstall/bsdinstall.8
  head/usr.sbin/bsdinstall/scripts/auto
  head/usr.sbin/bsdinstall/scripts/config
  head/usr.sbin/bsdinstall/scripts/docsinstall
  head/usr.sbin/bsdinstall/scripts/jail
  head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
  head/usr.sbin/bsdinstall/scripts/netconfig_ipv6
  head/usr.sbin/bsdinstall/scripts/script
  head/usr.sbin/bsdinstall/scripts/wlanconfig
  head/usr.sbin/bsdinstall/scripts/zfsboot

Modified: head/usr.sbin/bsdinstall/bsdinstall
==============================================================================
--- head/usr.sbin/bsdinstall/bsdinstall	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/bsdinstall	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,17 +26,62 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+# Delay processing of debug flags as the parent until MAIN. export'd to disable
+# re-processing of flags (all children log to the parent's log file).
+#
+export DEBUG_SELF_INITIALIZE=
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+
+############################################################ GLOBALS
 
-: ${BSDINSTALL_LOG="/tmp/bsdinstall_log"}; export BSDINSTALL_LOG
 : ${BSDINSTALL_TMPETC="/tmp/bsdinstall_etc"}; export BSDINSTALL_TMPETC
 : ${BSDINSTALL_TMPBOOT="/tmp/bsdinstall_boot"}; export BSDINSTALL_TMPBOOT
 : ${PATH_FSTAB="$BSDINSTALL_TMPETC/fstab"}; export PATH_FSTAB
 : ${BSDINSTALL_DISTDIR="/usr/freebsd-dist"}; export BSDINSTALL_DISTDIR
 : ${BSDINSTALL_CHROOT="/mnt"}; export BSDINSTALL_CHROOT
 
-VERB=${1:-auto}; shift
+export debugFile="${debugFile-${BSDINSTALL_LOG-/tmp/bsdinstall_log}}"
+
+############################################################ MAIN
+
+#
+# Process command-line arguments
+#
+while getopts $GETOPTS_STDARGS ignored; do
+	: just skipping known flags
+done
+shift $(( $OPTIND - 1 ))
+
+# What are we here to do?
+VERB="${1:-auto}"; shift
 
 [ -d "$BSDINSTALL_TMPETC" ] || mkdir -p "$BSDINSTALL_TMPETC"
 [ -d "$BSDINSTALL_TMPBOOT" ] || mkdir -p "$BSDINSTALL_TMPBOOT"
-echo "Running installation step: $VERB $@" >> "$BSDINSTALL_LOG"
-exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$BSDINSTALL_LOG"
+
+# Only enable debugging if debugFile is non-NULL and can be initialized
+f_quietly f_debug_init
+f_isset debugFile || debug=
+
+f_dprintf "Running installation step: %s %s" "$VERB" "$*"
+if [ "$debug" ]; then
+	case "$debugFile" in
+	# If NULL, send errors to the bit-bucket
+	"") exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null ;;
+	# If begins with `+', send errors to both terminal and file (no `+')
+	+*) exec "/usr/libexec/bsdinstall/$VERB" "$@" \
+		2>&1 >&$TERMINAL_STDOUT_PASSTHRU | tee "${debugFile#+}" ;;
+	# Otherwise, just send errors to the file specified
+	*) exec "/usr/libexec/bsdinstall/$VERB" "$@" 2>> "$debugFile"
+	esac
+else
+	exec "/usr/libexec/bsdinstall/$VERB" "$@" 2> /dev/null
+fi
+
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/bsdinstall.8
==============================================================================
--- head/usr.sbin/bsdinstall/bsdinstall.8	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/bsdinstall.8	Fri Nov  8 09:57:03 2013	(r257842)
@@ -33,6 +33,7 @@
 .Nd system installer
 .Sh SYNOPSIS
 .Nm
+.Op Ar options
 .Op Ar target
 .Op Ar ...
 .Sh DESCRIPTION
@@ -49,6 +50,17 @@ invoked with no arguments, it will invok
 target, which provides a standard interactive installation, invoking the
 others in sequence. To perform a scripted installation, these subtargets
 can be invoked separately by an installation script.
+.Sh OPTIONS
+.Nm
+supports the following options, global to all targets:
+.Bl -tag -width indent+
+.It Fl D Ar file
+Provide a path for the installation log file
+.Pq overrides Ev BSDINSTALL_LOG .
+See
+.Sx ENVIRONMENT VARIABLES
+for more information on
+.Ev BSDINSTALL_LOG .
 .Sh TARGETS
 Most of the following targets are only useful for scripting the installer.
 For interactive use, most users will be interested only in the

Modified: head/usr.sbin/bsdinstall/scripts/auto
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/auto	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/auto	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,8 +26,13 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
 
-echo "Begun Installation at $(date)" > $BSDINSTALL_LOG
+############################################################ FUNCTIONS
 
 error() {
 	test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR
@@ -41,6 +47,9 @@ error() {
 	fi
 }
 
+############################################################ MAIN
+
+f_dprintf "Began Installation at %s" "$( date )"
 
 rm -rf $BSDINSTALL_TMPETC
 mkdir $BSDINSTALL_TMPETC
@@ -126,7 +135,12 @@ case "$PARTMODE" in
 	sh 2>&1
 	;;
 "Manual")	# Manual
-	bsdinstall partedit || error
+	if f_isset debugFile; then
+		# Give partedit the path to our logfile so it can append
+		BSDINSTALL_LOG="${debugFile#+}" bsdinstall partedit || error
+	else
+		bsdinstall partedit || error
+	fi
 	bsdinstall mount || error
 	;;
 "ZFS")	# ZFS
@@ -247,5 +261,8 @@ fi
 bsdinstall entropy
 bsdinstall umount
 
-echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG
+f_dprintf "Installation Completed at %s" "$( date )"
 
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/config
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/config	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/config	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,83 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ CONFIGURATION
+
+#
+# Location of ttys(5)
+#
+ETC_TTYS=/etc/ttys
+
+############################################################ FUNCTIONS
+
+# ttus_set_type $serterm
+#
+# Set terminal type of `ttyu*' and entries in ttys(5) to $serterm.
+#
+ttus_set_type()
+{
+	local serterm="$1" err
+
+	#
+	# Create new temporary file to write our ttys(5) update with new types.
+	#
+	local tmpfile="$( mktemp -t "pgm" )"
+	[ "$tmpfile" ] || return $FAILURE
+
+	#
+	# Fixup permissions and ownership (mktemp(1) creates the temporary file
+	# with 0600 permissions -- change the permissions and ownership to
+	# match ttys(5) before we write it out and mv(1) it into place).
+	#
+	local mode="$( stat -f '%#Lp' "$ETC_TTYS" 2> /dev/null )"
+	local owner="$( stat -f '%u:%g' "$ETC_TTYS" 2> /dev/null )"
+	f_quietly chmod "${mode:-0644}" "$tmpfile"
+	f_quietly chown "${owner:-root:wheel}" "$tmpfile"
+
+	#
+	# Operate on ttys(5), replacing only the types of `ttyu*' terminals
+	# with the new type.
+	#
+	if ! err=$( awk -v serterm="$serterm" '
+	BEGIN {
+	}
+	{
+		# "Skip" blank-lines, lines containing only whitespace, and
+		# lines containing only a comment or whitespace-then-comment.
+		#
+		if ( $0 ~ /^[[:space:]]*(#|$)/ ) { print; next }
+
+		# "Skip" terminal types other than those supported
+		#
+		if ( $1 !~ /^ttyu.*$/ ) { print; next }
+
+		# Change the terminal type to the new value and enable it
+		#
+		match($0,
+		  /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]|$).*$/)
+		if ( ! RSTART ) { print; next }
+		start = RSTART
+		left=substr($0, 0, RSTART - 1)
+		right=substr($0, start)
+		match(right,
+		  /[[:alnum:]\.\+-_]+[[:space:]]+(on|off)([[:space:]]+|$)/)
+		right=substr(right, RSTART + RLENGTH)
+		printf "%s%s on %s\n", left, serterm, right
+	}
+	' "$ETC_TTYS" > "$tmpfile" 2>&1 ); then
+		f_show_err "%s" "$err"
+		return $FAILURE
+	fi
+	if ! err=$( mv -f "$tmpfile" "$ETC_TTYS" 2>&1 ); then
+		f_show_err "%s" "$err"
+		return $FAILURE
+	fi
+
+	return $SUCCESS
+}
+
+############################################################ MAIN
 
 cat $BSDINSTALL_TMPETC/rc.conf.* >> $BSDINSTALL_TMPETC/rc.conf
 rm $BSDINSTALL_TMPETC/rc.conf.*
@@ -39,3 +117,8 @@ cp $BSDINSTALL_TMPBOOT/* $BSDINSTALL_CHR
 # Set up other things from installed config
 chroot $BSDINSTALL_CHROOT /usr/bin/newaliases
 
+kbdcontrol -d || ttus_set_type vt100
+
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/docsinstall
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/docsinstall	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/docsinstall	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Marc Fonvieille
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,62 +26,137 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/mustberoot.subr
+f_include $BSDCFG_SHARE/packages/packages.subr
 
+############################################################ CONFIGURATION
 
-exec 3>&1
-DOCS=$(dialog --backtitle "FreeBSD Installer" \
-    --title "FreeBSD Documentation Installation" --separate-output \
-    --checklist "This menu will allow you to install the whole documentation set
-from the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n
-Please select the language versions you wish to install.  At minimum,
-you should install the English version, this is the original version
-of the documentation.\n\n
-NB: This requires a working, configured network connection." 0 0 0 \
-	bn	"Bengali Documentation" ${DIST_DOC_BN:-off} \
-	da	"Danish Documentation" ${DIST_DOC_DA:-off} \
-	de	"German Documentation" ${DIST_DOC_DE:-off} \
-	el	"Greek Documentation" ${DIST_DOC_EL:-off} \
-	en	"English Documentation (recommended)" ${DIST_DOC_EN:-on} \
-	es	"Spanish Documentation" ${DIST_DOC_ES:-off} \
-	fr	"French Documentation" ${DIST_DOC_FR:-off} \
-	hu	"Hungarian Documentation" ${DIST_DOC_HU:-off} \
-	it	"Italian Documentation" ${DIST_DOC_IT:-off} \
-	ja	"Japanese Documentation" ${DIST_DOC_JA:-off} \
-	mn	"Mongolian Documentation" ${DIST_DOC_MN:-off} \
-	nl	"Dutch Documentation" ${DIST_DOC_NL:-off} \
-	pl	"Polish Documentation" ${DIST_DOC_PL:-off} \
-	pt	"Portuguese Documentation" ${DIST_DOC_PT:-off} \
-	ru	"Russian Documentation" ${DIST_DOC_RU:-off} \
-	sr	"Serbian Documentation" ${DIST_DOC_SR:-off} \
-	tr	"Turkish Documentation" ${DIST_DOC_TR:-off} \
-	zh_cn	"Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \
-	zh_tw	"Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \
-2>&1 1>&3)
-test $? -eq 0 || exit 0
-exec 3>&-
-
-# Let pkg(8) be able to use name servers
-cp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc
-
-error() {
-	dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \
-	    "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0
-	exit 1
+#
+# List of languages to display (descriptions pulled from $msg_{lang}doc_desc)
+#
+: ${DOCSINSTALL_LANGS:=\
+	bn da de el en es fr hu it ja mn nl pl pt ru sr tr zh_cn zh_tw \
 }
 
+############################################################ GLOBALS
+
+#
+# Strings that should be moved to an i18n file and loaded with f_include_lang()
+#
+hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER"
+msg_bndoc_desc="Bengali Documentation"
+msg_cancel="Cancel"
+msg_dadoc_desc="Danish Documentation"
+msg_dedoc_desc="German Documentation"
+msg_docsinstall_menu_text="This menu allows you to install the whole documentation set from\nthe FreeBSD Documentation Project: Handbook, FAQ, and articles.\n\nPlease select the language versions you wish to install. At\nminimum, you should install the English version, the original\nversion of the documentation."
+msg_eldoc_desc="Greek Documentation"
+msg_endoc_desc="English Documentation (recommended)"
+msg_esdoc_desc="Spanish Documentation"
+msg_frdoc_desc="French Documentation"
+msg_freebsd_documentation_installation="FreeBSD Documentation Installation"
+msg_freebsd_installer="FreeBSD Installer"
+msg_hudoc_desc="Hungarian Documentation"
+msg_itdoc_desc="Italian Documentation"
+msg_jadoc_desc="Japanese Documentation"
+msg_mndoc_desc="Mongolian Documentation"
+msg_nldoc_desc="Dutch Documentation"
+msg_ok="OK"
+msg_pldoc_desc="Polish Documentation"
+msg_ptdoc_desc="Portuguese Documentation"
+msg_rudoc_desc="Russian Documentation"
+msg_srdoc_desc="Serbian Documentation"
+msg_trdoc_desc="Turkish Documentation"
+msg_zh_cndoc_desc="Simplified Chinese Documentation"
+msg_zh_twdoc_desc="Traditional Chinese Documentation"
+
+############################################################ FUNCTIONS
+
+# dialog_menu_main
+#
+# Display the dialog(1)-based application main menu.
+#
+dialog_menu_main()
+{
+	local title="$DIALOG_TITLE"
+	local btitle="$DIALOG_BACKTITLE"
+	local prompt="$msg_docsinstall_menu_text"
+	local check_list= # Calculated below
+	local hline="$hline_arrows_space_tab_enter"
+
+	local lang desc upper status
+	for lang in $DOCSINSTALL_LANGS; do
+		# Fetch the i18n description to display
+		f_getvar msg_${lang}doc_desc desc
+		f_shell_escape "$desc" desc
+
+		# Get default status for each language
+		upper=$( echo "$lang" | awk '{print toupper($0)}' )
+		case "$lang" in
+		en) f_getvar DIST_DOC_$upper:-on status ;;
+		 *) f_getvar DIST_DOC_$upper:-off status
+		esac
+
+		check_list="$check_list
+			'$lang' '$desc' '$status'
+		" # END-QUOTE
+	done
+
+	local height width rows
+	eval f_dialog_checklist_size height width rows \
+	                             \"\$title\"  \
+	                             \"\$btitle\" \
+	                             \"\$prompt\" \
+	                             \"\$hline\"  \
+	                             $check_list
+	local selected
+	selected=$( eval $DIALOG \
+		--title \"\$title\"             \
+		--backtitle \"\$btitle\"        \
+		--hline \"\$hline\"             \
+		--ok-label \"\$msg_ok\"         \
+		--cancel-label \"\$msg_cancel\" \
+		--checklist \"\$prompt\"        \
+		$height $width $rows            \
+		$check_list                     \
+		2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
+	)
+	local retval=$?
+	f_dialog_menutag_store -s "$selected"
+	return $retval
+}
 
-clear
-echo "FreeBSD Installer"
-echo "========================"
-echo
-
-echo "Please wait while the repository metadata is fetched."
-echo "This may take a few moments."
-
-env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install pkg \
-	|| error pkg
-
-for i in $DOCS; do
-    env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install ${i}-freebsd-doc \
-	|| error $i-freebsd-doc
+############################################################ MAIN
+
+#
+# Initialize
+#
+f_dialog_title "$msg_freebsd_documentation_installation"
+f_dialog_backtitle "$msg_freebsd_installer"
+f_mustberoot_init
+
+#
+# Launch application main menu
+#
+dialog_menu_main || f_die
+f_dialog_menutag_fetch selected
+
+# Let pkg_add be able to use name servers
+f_quietly cp -f $BSDINSTALL_TMPETC/resolv.conf $BSDINSTALL_CHROOT/etc/
+
+#
+# Install each of the selected packages
+#
+for lang in $selected; do
+	f_package_add $lang-freebsd-doc || return $FAILURE
 done
+
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/jail
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/jail	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/jail	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,8 +26,15 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+
+############################################################ MAIN
 
-echo "Begun Installation at $(date)" > $BSDINSTALL_LOG
+f_dprintf "Began Installation at %s" "$( date )"
 export BSDINSTALL_CHROOT=$1
 
 error() {
@@ -112,5 +120,8 @@ cp /etc/localtime $1/etc
 
 bsdinstall entropy
 
-echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG
+f_dprintf "Installation Completed at %s" "$(date)"
 
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,13 +26,15 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
 
-: ${DIALOG_OK=0}
-: ${DIALOG_CANCEL=1}
-: ${DIALOG_HELP=2}
-: ${DIALOG_EXTRA=3}
-: ${DIALOG_ITEM_HELP=4}
-: ${DIALOG_ESC=255}
+############################################################ MAIN
 
 INTERFACE=$1
 IFCONFIG_PREFIX="$2"
@@ -49,8 +52,9 @@ if [ $? -eq $DIALOG_OK ]; then
 
 	if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
 		dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0
-		dhclient $INTERFACE 2>> $BSDINSTALL_LOG
+		err=$( dhclient $INTERFACE 2>&1 )
 		if [ $? -ne 0 ]; then
+			f_dprintf "%s" "$err"
 			dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition failed." 0 0
 			exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}"
 		fi
@@ -86,3 +90,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t
 	fi
 fi
 
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv6
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/netconfig_ipv6	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv6	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,8 +1,8 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
-# All rights reserved.
 # Copyright (c) 2011 The FreeBSD Foundation
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Portions of this software were developed by Bjoern Zeeb
@@ -30,19 +30,21 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+
+############################################################ MAIN
 
 #
 # TODO: 
 # - Add DHCPv6 support once FreeBSD ships with it.
 # 
 
-: ${DIALOG_OK=0}
-: ${DIALOG_CANCEL=1}
-: ${DIALOG_HELP=2}
-: ${DIALOG_EXTRA=3}
-: ${DIALOG_ITEM_HELP=4}
-: ${DIALOG_ESC=255}
-
 INTERFACE=$1
 case "${INTERFACE}" in
 "")	dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' \
@@ -61,8 +63,9 @@ while : ; do
 			dialog --backtitle 'FreeBSD Installer' \
 			    --infobox "Sending Router Solicitation ..." 0 0
 			ifconfig ${INTERFACE} inet6 -ifdisabled accept_rtadv up
-			rtsol -F $INTERFACE 2>> $BSDINSTALL_LOG
+			err=$( rtsol -F $INTERFACE 2>&1 )
 			if [ $? -ne 0 ]; then
+				f_dprintf "%s" "$err"
 				dialog --backtitle 'FreeBSD Installer' --msgbox "SLAAC failed." 0 0
 				AGAIN=" again"
 				continue
@@ -148,3 +151,6 @@ if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; t
 	fi
 fi
 
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/script
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/script	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/script	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2013 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,27 +26,55 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+f_dprintf "%s: loading includes..." "$0"
+f_include $BSDCFG_SHARE/dialog.subr
+f_include $BSDCFG_SHARE/variable.subr
+
+############################################################ CONFIGURATION
 
 # VARIABLES:
 # PARTITIONS
 # DISTRIBUTIONS
 # BSDINSTALL_DISTDIR
 
-error() {
-	test -f $PATH_FSTAB && bsdinstall umount
-	echo "Installation Error!"
-	cat $BSDINSTALL_LOG
-	echo "Installation Error!"
+############################################################ GLOBALS
+
+#
+# Strings that should be moved to an i18n file and loaded with f_include_lang()
+#
+msg_installation_error="Installation Error!"
+
+############################################################ FUNCTIONS
+
+error()
+{
+	[ -f "$PATH_FSTAB" ] && bsdinstall umount
+	
+	local file
+	f_getvar "$VAR_DEBUG_FILE#+" file
+	if [ "$file" ]; then
+		f_dialog_title "$msg_installation_error"
+		f_dialog_textbox "$file"
+		# No need to restore title, pining for the fjords
+	fi
+
 	exit 1
 }
 
+############################################################ MAIN
+
 set -e
 trap error EXIT
 
 SCRIPT="$1"
 shift
 
-echo "Begun Installation at $(date)" > $BSDINSTALL_LOG
+f_dprintf "Began Instalation at %s" "$( date )"
 rm -rf $BSDINSTALL_TMPETC
 mkdir $BSDINSTALL_TMPETC
 
@@ -55,6 +84,14 @@ split -a 2 -p '^#!.*' "$SCRIPT" /tmp/bsd
 : ${DISTRIBUTIONS="kernel.txz base.txz"}; export DISTRIBUTIONS
 export BSDINSTALL_DISTDIR
 
+# Re-initialize a new log if preamble changed BSDINSTALL_LOG
+if [ "$BSDINSTALL_LOG" != "${debugFile#+}" ]; then
+	export debugFile="$BSDINSTALL_LOG"
+	f_quietly f_debug_init
+	# NB: Being scripted, let debug go to terminal for invalid debugFile
+	f_dprintf "Began Instalation at %s" "$( date )"
+fi
+
 # Make partitions
 rm -f $PATH_FSTAB
 touch $PATH_FSTAB
@@ -86,6 +123,10 @@ fi
 bsdinstall entropy
 bsdinstall umount
 
-echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG
+f_dprintf "Installation Completed at %s" "$( date )"
 
 trap true EXIT
+
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/wlanconfig	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/wlanconfig	Fri Nov  8 09:57:03 2013	(r257842)
@@ -1,6 +1,7 @@
 #!/bin/sh
 #-
 # Copyright (c) 2011 Nathan Whitehorn
+# Copyright (c) 2013 Devin Teske
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,13 @@
 # SUCH DAMAGE.
 #
 # $FreeBSD$
+#
+############################################################ INCLUDES
+
+BSDCFG_SHARE="/usr/share/bsdconfig"
+. $BSDCFG_SHARE/common.subr || exit 1
+
+############################################################ MAIN
 
 echo -n > $BSDINSTALL_TMPETC/wpa_supplicant.conf
 chmod 0600 $BSDINSTALL_TMPETC/wpa_supplicant.conf
@@ -50,7 +58,8 @@ if [ $? -ne 0 -a -z $BSDINSTALL_CONFIGCU
 	exit 1
 fi
 
-wpa_cli scan >>$BSDINSTALL_LOG
+output=$( wpa_cli scan 2>&1 )
+f_dprintf "%s" "$output"
 dialog --backtitle "FreeBSD Installer" --title "Scanning" --ok-label "Skip" \
 	--pause "Waiting 5 seconds to scan for wireless networks..." \
 	9 40 5 || exit 1
@@ -132,6 +141,13 @@ echo "network={
 }" >> $BSDINSTALL_TMPETC/wpa_supplicant.conf
 
 # Bring up new network
-test ! -z $BSDINSTALL_CONFIGCURRENT && wpa_cli reconfigure >>$BSDINSTALL_LOG
+if [ "$BSDINSTALL_CONFIGCURRENT" ]; then
+	output=$( wpa_cli reconfigure 2>&1 )
+	f_dprintf "%s" "$output"
+fi
 
 exit 0
+
+################################################################################
+# END
+################################################################################

Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/zfsboot	Fri Nov  8 08:44:09 2013	(r257841)
+++ head/usr.sbin/bsdinstall/scripts/zfsboot	Fri Nov  8 09:57:03 2013	(r257842)
@@ -67,7 +67,7 @@ f_include $BSDCFG_SHARE/variable.subr
 #
 # Should we use geli(8) to encrypt the drives?
 #
-: ${ZFSBOOT_GELI_ENCRYPTION:=}
+: ${ZFSBOOT_GELI_ENCRYPTION=}
 
 #
 # Default name the unencrypted pool when using geli(8) to encrypt the drives
@@ -101,7 +101,7 @@ f_include $BSDCFG_SHARE/variable.subr
 : ${ZFSBOOT_SWAP_SIZE:=2g}
 
 #
-# Default ZFS layout for root zpool
+# Default ZFS datasets for root zpool
 #
 # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME
 # NOTE: Anything after pound/hash character [#] is ignored as a comment.
@@ -120,65 +120,109 @@ f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATA
 	/usr		mountpoint=/usr,canmount=off
 
 	# Home directories separated so they are common to all BEs
-	/usr/home	setuid=off
+	/usr/home	# NB: /home is a symlink to /usr/home
 
 	# Ports tree
 	/usr/ports		compression=lz4,setuid=off
-	/usr/ports/distfiles	compression=off,exec=off,setuid=off
-	/usr/ports/packages	compression=off,exec=off,setuid=off
 
 	# Source tree (compressed)
 	/usr/src	compression=lz4,exec=off,setuid=off
-	/usr/obj	# Object files
 
 	# Create /var and friends
 	/var		mountpoint=/var
 	/var/crash	compression=lz4,exec=off,setuid=off
-	/var/db		exec=off,setuid=off
-	/var/empty	exec=off,setuid=off
 	/var/log	compression=lz4,exec=off,setuid=off
-	/var/mail	compression=lz4,exec=off,setuid=off
-	/var/run	exec=off,setuid=off
 	/var/tmp	compression=lz4,exec=on,setuid=off
 " # END-QUOTE
 
+#
+# If interactive and the user has not explicitly chosen a vdev type or disks,
+# make the user confirm scripted/default choices when proceeding to install.
+#
+: ${ZFSBOOT_CONFIRM_LAYOUT:=1}
+
 ############################################################ GLOBALS
 
 #
+# Format of a line in printf(1) syntax to add to fstab(5)
+#
+FSTAB_FMT="%s\t\t%s\t%s\t%s\t\t%s\t%s\n"
+
+#
+# Command strings for various tasks
+#
+CHMOD_MODE='chmod %s "%s"'
+DD_WITH_OPTIONS='dd if="%s" of="%s" %s'
+ECHO_APPEND='echo "%s" >> "%s"'
+GELI_ATTACH='geli attach -j - -k "%s" "%s"'
+GELI_PASSWORD_INIT='geli init -b -B "%s" -e %s -J - -K "%s" -l 256 -s 4096 "%s"'
+GNOP_CREATE='gnop create -S 4096 "%s"'
+GPART_ADD='gpart add -t %s "%s"'
+GPART_ADD_INDEX='gpart add -i %s -t %s "%s"'
+GPART_ADD_INDEX_WITH_SIZE='gpart add -i %s -t %s -s %s "%s"'
+GPART_ADD_LABEL='gpart add -l %s -t %s "%s"'
+GPART_ADD_LABEL_WITH_SIZE='gpart add -l %s -t %s -s %s "%s"'
+GPART_BOOTCODE='gpart bootcode -b "%s" "%s"'
+GPART_BOOTCODE_PART='gpart bootcode -b "%s" -p "%s" -i %s "%s"'
+GPART_CREATE='gpart create -s %s "%s"'
+GPART_SET_ACTIVE='gpart set -a active -i %s "%s"'
+LN_SF='ln -sf "%s" "%s"'
+MKDIR_P='mkdir -p "%s"'
+MOUNT_TYPE='mount -t %s "%s" "%s"'
+PRINTF_CONF="printf '%s=\"%%s\"\\\n' %s >> \"%s\""
+PRINTF_FSTAB='printf "$FSTAB_FMT" "%s" "%s" "%s" "%s" "%s" "%s" >> "%s"'
+SHELL_TRUNCATE=':> "%s"'
+ZFS_CREATE_WITH_OPTIONS='zfs create %s "%s"'
+ZFS_SET='zfs set "%s" "%s"'
+ZFS_UNMOUNT='zfs unmount "%s"'
+ZPOOL_CREATE_WITH_OPTIONS='zpool create %s "%s" %s %s'
+ZPOOL_EXPORT='zpool export "%s"'
+ZPOOL_IMPORT_WITH_OPTIONS='zpool import %s "%s"'
+ZPOOL_SET='zpool set %s "%s"'
+
+#
 # Strings that should be moved to an i18n file and loaded with f_include_lang()
 #
 hline_alnum_arrows_punc_tab_enter="Use alnum, arrows, punctuation, TAB or ENTER"
 hline_arrows_space_tab_enter="Use arrows, SPACE, TAB or ENTER"
 hline_arrows_tab_enter="Press arrows, TAB or ENTER"
+msg_an_unknown_error_occurred="An unknown error occurred"
 msg_back="Back"
 msg_cancel="Cancel"
-msg_change="Change Selection"
+msg_change_selection="Change Selection"
 msg_configure_options="Configure Options:"
-msg_create="Install"
-msg_create_desc="Proceed with Installation"
-msg_create_help="Create ZFS boot pool with displayed options"
 msg_detailed_disk_info="gpart(8) show %s:\n%s\n\ncamcontrol(8) inquiry %s:\n%s\n\n\ncamcontrol(8) identify %s:\n%s\n"
 msg_disk_info="Disk Info"
 msg_disk_info_help="Get detailed information on disk device(s)"
-msg_disks_to_use="Disks To Use"
-msg_disks_to_use_help="Choose which disks to use for the Virtual Device (Required)"
+msg_encrypt_disks="Encrypt Disks?"
+msg_encrypt_disks_help="Use geli(8) to encrypt all data partitions"
+msg_error="Error"
 msg_force_4k_sectors="Force 4K Sectors?"
 msg_force_4k_sectors_help="Use gnop(8) to configure forced 4K sector alignment"
 msg_freebsd_installer="FreeBSD Installer"
-msg_geli_encryption="Encrypt Disks?"
-msg_geli_encryption_help="Use geli(8) to encrypt all data partitions"
 msg_geli_password="Enter a strong passphrase, used to protect your encryption keys. You will be required to enter this passphrase each time the system is booted"
 msg_geli_setup="Initializing encryption on the selected disks, this will take several seconds per disk"
+msg_install="Install"
+msg_install_desc="Proceed with Installation"
+msg_install_help="Create ZFS boot pool with displayed options"
+msg_invalid_disk_argument="Invalid disk argument \`%s'"
+msg_invalid_geli_boot_size="Invalid geli(8) boot size \`%s'"
+msg_invalid_index_argument="Invalid index argument \`%s'"
+msg_invalid_swap_size="Invalid swap size \`%s'"
 msg_invalid_virtual_device_type="Invalid Virtual Device type \`%s'"
-msg_invalid_virtual_device_type_help="Select another Virtual Device type or Cancel to\nreturn to the ZFS menu. From there you can select\nmore disks or rescan for additional devices."
-msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy the current contents of the following disks:\n%s"
-msg_last_chance_are_you_sure_color="\\\\ZrLast Chance!\\\\ZR Are you \\\\Z1sure\\\\Zn you want to \\\\Zr\\\\Z1destroy\\\\Zn the current contents of the following disks:\n%s"
+msg_last_chance_are_you_sure="Last Chance! Are you sure you want to destroy\nthe current contents of the following disks:\n\n   %s"
+msg_last_chance_are_you_sure_color='\\ZrLast Chance!\\ZR Are you \\Z1sure\\Zn you want to \\Zr\\Z1destroy\\Zn\nthe current contents of the following disks:\n\n   %s'
 msg_mirror_desc="Mirror - n-Way Mirroring"
 msg_mirror_help="[2+ Disks] Mirroring provides the best performance, but the least storage"
+msg_missing_disk_arguments="missing disk arguments"
+msg_missing_one_or_more_scripted_disks="Missing one or more scripted disks!"
 msg_no="NO"
 msg_no_disks_present_to_configure="No disk(s) present to configure"
 msg_no_disks_selected="No disks selected."
-msg_not_enough_disks_selected="Not enough disks selected. (%u < %u wanted)"
+msg_not_enough_disks_selected="Not enough disks selected. (%u < %u minimum)"
+msg_null_disk_argument="NULL disk argument"
+msg_null_index_argument="NULL index argument"
+msg_null_poolname="NULL poolname"
 msg_ok="OK"
 msg_partition_scheme="Partition Scheme"
 msg_partition_scheme_help="Toggle between GPT and MBR partitioning schemes"
@@ -188,6 +232,8 @@ msg_please_select_one_or_more_disks="Ple
 msg_pool_name="Pool Name"
 msg_pool_name_cannot_be_empty="Pool name cannot be empty."
 msg_pool_name_help="Customize the name of the zpool to be created (Required)"
+msg_pool_type_disks="Pool Type/Disks:"
+msg_pool_type_disks_help="Choose type of ZFS Virtual Device and disks to use (Required)"
 msg_processing_selection="Processing selection..."
 msg_raidz1_desc="RAID-Z1 - Single Redundant RAID"
 msg_raidz1_help="[3+ Disks] Withstand failure of 1 disk. Recommended for: 3, 5 or 9 disks"
@@ -204,11 +250,12 @@ msg_stripe_desc="Stripe - No Redundancy"
 msg_stripe_help="[1+ Disks] Striping provides maximum storage but no redundancy"
 msg_swap_size="Swap Size"
 msg_swap_size_help="Customize how much swap space is allocated to each selected disk"
-msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or GELI (%s) partitions, which would take\n50%% or more (not recommended) of each of the following\nselected disk devices:\n\n  %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices."
+msg_these_disks_are_too_small="These disks are too small given the amount of requested\nswap (%s) and/or geli(8) (%s) partitions, which would\ntake 50%% or more of each of the following selected disk\ndevices (not recommended):\n\n  %s\n\nRecommend changing partition size(s) and/or selecting a\ndifferent set of devices."
+msg_unable_to_get_disk_capacity="Unable to get disk capacity of \`%s'"
+msg_unsupported_partition_scheme="%s is an unsupported partition scheme"
+msg_user_cancelled="User Cancelled."
 msg_yes="YES"
 msg_zfs_configuration="ZFS Configuration"
-msg_zfs_vdev_type="ZFS VDev Type"
-msg_zfs_vdev_type_help="Select type of ZFS Virtual Device to create"
 
 ############################################################ FUNCTIONS
 
@@ -225,26 +272,26 @@ dialog_menu_main()
 	local usegeli="$msg_no"
 	[ "$ZFSBOOT_GNOP_4K_FORCE_ALIGN" ] && force4k="$msg_yes"
 	[ "$ZFSBOOT_GELI_ENCRYPTION" ] && usegeli="$msg_yes"
+	local disks n=$( set -- $ZFSBOOT_DISKS; echo $# )
+	{ [ $n -eq 1 ] && disks=disk; } || disks=disks # grammar
 	local menu_list="
-		'>>> $msg_create'         '$msg_create_desc'
-		                          '$msg_create_help'
+		'>>> $msg_install'        '$msg_install_desc'
+		                          '$msg_install_help'
+		'T $msg_pool_type_disks'  '$ZFSBOOT_VDEV_TYPE: $n $disks'
+                                          '$msg_pool_type_disks_help'
 		'- $msg_rescan_devices'   '*'
 		                          '$msg_rescan_devices_help'
 		'- $msg_disk_info'        '*'
 		                          '$msg_disk_info_help'
-		'1 $msg_pool_name'        '$ZFSBOOT_POOL_NAME'
+		'N $msg_pool_name'        '$ZFSBOOT_POOL_NAME'
 		                          '$msg_pool_name_help'
-		'2 $msg_disks_to_use'     '$ZFSBOOT_DISKS'
-		                          '$msg_disks_to_use_help'
-		'3 $msg_zfs_vdev_type'    '$ZFSBOOT_VDEV_TYPE'
-		                          '$msg_zfs_vdev_type_help'
 		'4 $msg_force_4k_sectors' '$force4k'
 		                          '$msg_force_4k_sectors_help'
-		'5 $msg_geli_encryption'  '$usegeli'
-		                          '$msg_geli_encryption_help'
-		'6 $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME'
+		'E $msg_encrypt_disks'    '$usegeli'
+		                          '$msg_encrypt_disks_help'
+		'P $msg_partition_scheme' '$ZFSBOOT_PARTITION_SCHEME'
 		                          '$msg_partition_scheme_help'
-		'7 $msg_swap_size'        '$ZFSBOOT_SWAP_SIZE'
+		'S $msg_swap_size'        '$ZFSBOOT_SWAP_SIZE'
 		                          '$msg_swap_size_help'
 	" # END-QUOTE
 	local defaultitem= # Calculated below
@@ -281,158 +328,279 @@ dialog_menu_main()
 	return $retval
 }
 
-# dialog_edit_disks
+# dialog_last_chance $disks ...
 #
-# Edit the list of disks to be used by the ZFS boot pool.
+# Display a list of the disks that the user is about to destroy. The default
+# action is to return error status unless the user explicitly (non-default)
+# selects "Yes" from the noyes dialog.
 #
-dialog_edit_disks()
+dialog_last_chance()
 {
 	local title="$DIALOG_TITLE"
 	local btitle="$DIALOG_BACKTITLE"
-	local prompt="$msg_please_select_one_or_more_disks"
-	local check_list= # Calculated below
-	local hline="$hline_arrows_space_tab_enter"
-	local dev vardev disks=
+	local prompt # Calculated below
+	local hline="$hline_arrows_tab_enter"
 
-	#

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-head mailing list