head	1.21;
access;
symbols
	RELENG_9_1_0_RELEASE:1.14.2.4.2.2
	RELENG_9_1:1.14.2.4.0.2
	RELENG_9_1_BP:1.14.2.4
	RELENG_9_0_0_RELEASE:1.14.2.3.2.2
	RELENG_9_0:1.14.2.3.0.2
	RELENG_9_0_BP:1.14.2.3
	RELENG_9:1.14.0.2
	RELENG_9_BP:1.14;
locks; strict;
comment	@# @;


1.21
date	2012.11.17.01.54.40;	author svnexp;	state Exp;
branches;
next	1.20;

1.20
date	2012.10.27.19.56.57;	author dteske;	state Exp;
branches;
next	1.19;

1.19
date	2012.10.22.18.14.27;	author dteske;	state Exp;
branches;
next	1.18;

1.18
date	2012.03.05.02.40.18;	author nwhitehorn;	state Exp;
branches;
next	1.17;

1.17
date	2011.12.02.02.05.26;	author nwhitehorn;	state Exp;
branches;
next	1.16;

1.16
date	2011.10.18.11.29.10;	author kensmith;	state Exp;
branches;
next	1.15;

1.15
date	2011.10.06.14.24.37;	author nwhitehorn;	state Exp;
branches;
next	1.14;

1.14
date	2011.09.17.09.25.45;	author nwhitehorn;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	2011.07.09.23.01.54;	author nwhitehorn;	state Exp;
branches;
next	1.12;

1.12
date	2011.06.02.13.57.49;	author nwhitehorn;	state Exp;
branches;
next	1.11;

1.11
date	2011.05.28.16.15.46;	author nwhitehorn;	state Exp;
branches;
next	1.10;

1.10
date	2011.04.19.13.54.51;	author nwhitehorn;	state Exp;
branches;
next	1.9;

1.9
date	2011.04.09.14.18.03;	author nwhitehorn;	state Exp;
branches;
next	1.8;

1.8
date	2011.03.28.04.29.50;	author nwhitehorn;	state Exp;
branches;
next	1.7;

1.7
date	2011.03.28.02.37.05;	author nwhitehorn;	state Exp;
branches;
next	1.6;

1.6
date	2011.03.27.23.43.32;	author nwhitehorn;	state Exp;
branches;
next	1.5;

1.5
date	2011.03.13.17.15.31;	author nwhitehorn;	state Exp;
branches;
next	1.4;

1.4
date	2011.03.11.19.40.49;	author nwhitehorn;	state Exp;
branches;
next	1.3;

1.3
date	2011.03.02.15.41.00;	author nwhitehorn;	state Exp;
branches;
next	1.2;

1.2
date	2011.02.22.13.56.59;	author nwhitehorn;	state Exp;
branches;
next	1.1;

1.1
date	2011.02.18.14.54.34;	author nwhitehorn;	state Exp;
branches;
next	;

1.14.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2011.10.10.13.58.33;	author nwhitehorn;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2011.10.18.13.48.31;	author kensmith;	state Exp;
branches
	1.14.2.3.2.1;
next	1.14.2.4;

1.14.2.4
date	2011.12.03.17.15.16;	author nwhitehorn;	state Exp;
branches
	1.14.2.4.2.1;
next	1.14.2.5;

1.14.2.5
date	2012.11.17.11.37.43;	author svnexp;	state Exp;
branches;
next	1.14.2.6;

1.14.2.6
date	2013.03.13.14.04.34;	author svnexp;	state Exp;
branches;
next	1.14.2.7;

1.14.2.7
date	2014.03.31.02.01.45;	author svnexp;	state Exp;
branches;
next	1.14.2.8;

1.14.2.8
date	2014.04.14.02.01.43;	author svnexp;	state Exp;
branches;
next	;

1.14.2.3.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.14.2.3.2.2;

1.14.2.3.2.2
date	2011.12.03.17.17.32;	author nwhitehorn;	state Exp;
branches;
next	1.14.2.3.2.3;

1.14.2.3.2.3
date	2012.11.17.08.37.39;	author svnexp;	state Exp;
branches;
next	;

1.14.2.4.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.14.2.4.2.2;

1.14.2.4.2.2
date	2012.11.17.08.48.31;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.21
log
@Switching exporter and resync
@
text
@#!/bin/sh
#-
# Copyright (c) 2011 Nathan Whitehorn
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: head/usr.sbin/bsdinstall/scripts/auto 242188 2012-10-27 19:56:57Z dteske $

echo "Begun Installation at $(date)" > $BSDINSTALL_LOG

error() {
	test -n "$DISTDIR_IS_UNIONFS" && umount -f $BSDINSTALL_DISTDIR
	test -f $PATH_FSTAB && bsdinstall umount
	dialog --backtitle "FreeBSD Installer" --title "Abort" \
	    --no-label "Exit" --yes-label "Restart" --yesno \
	    "An installation step has been aborted. Would you like to restart the installation or exit the installer?" 0 0
	if [ $? -ne 0 ]; then
		exit 1
	else
		exec $0
	fi
}


rm -rf $BSDINSTALL_TMPETC
mkdir $BSDINSTALL_TMPETC

trap true SIGINT	# This section is optional
bsdinstall keymap

trap error SIGINT	# Catch cntrl-C here
bsdinstall hostname || error

export DISTRIBUTIONS="base.txz kernel.txz"
if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; then
	DISTMENU=`awk -F'\t' '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST`

	exec 3>&1
	EXTRA_DISTS=$( eval dialog \
	    --backtitle \"FreeBSD Installer\" \
	    --title \"Distribution Select\" --nocancel --separate-output \
	    --checklist \"Choose optional system components to install:\" \
	    0 0 0 $DISTMENU \
	2>&1 1>&3 )
	for dist in $EXTRA_DISTS; do
		export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
	done
fi

FETCH_DISTRIBUTIONS=""
for dist in $DISTRIBUTIONS; do
	if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
		FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
	fi
done
FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS`	# Trim white space

if [ -n "$FETCH_DISTRIBUTIONS" -a -n "$BSDINSTALL_CONFIGCURRENT" ]; then
	dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "No installation files were found on the boot volume. The next few screens will allow you to configure networking so that they can be downloaded from the Internet." 0 0
	bsdinstall netconfig || error
	NETCONFIG_DONE=yes
fi

if [ -n "$FETCH_DISTRIBUTIONS" ]; then
	exec 3>&1
	BSDINSTALL_DISTSITE=$(`dirname $0`/mirrorselect 2>&1 1>&3)
	MIRROR_BUTTON=$?
	exec 3>&-
	test $MIRROR_BUTTON -eq 0 || error
	export BSDINSTALL_DISTSITE
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

case $? in
0)	# Guided
	bsdinstall autopart || error
	bsdinstall mount || error
	;;
1)	# 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
	bsdinstall partedit || error
	bsdinstall mount || error
	;;
*)
	error
	;;
esac

if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
	ALL_DISTRIBUTIONS="$DISTRIBUTIONS"

	# Download to a directory in the new system as scratch space
	BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist"
	mkdir -p "$BSDINSTALL_FETCHDEST" || error

	export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
	# Try to use any existing distfiles
	if [ -d $BSDINSTALL_DISTDIR ]; then
		DISTDIR_IS_UNIONFS=1
		mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
	else
		export DISTRIBUTIONS="MANIFEST $ALL_DISTRIBUTIONS"
		export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST"
	fi
		
	export FTP_PASSIVE_MODE=YES
	bsdinstall distfetch || error
	export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
fi

bsdinstall checksum || error
bsdinstall distextract || error
bsdinstall rootpass || error

trap true SIGINT	# This section is optional
if [ "$NETCONFIG_DONE" != yes ]; then
	bsdinstall netconfig	# Don't check for errors -- the user may cancel
fi
bsdinstall time
bsdinstall services

dialog --backtitle "FreeBSD Installer" --title "Add User Accounts" --yesno \
    "Would you like to add users to the installed system now?" 0 0 && \
    bsdinstall adduser

finalconfig() {
	exec 3>&1
	REVISIT=$(dialog --backtitle "FreeBSD Installer" \
	    --title "Final Configuration" --no-cancel --menu \
	    "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \
		"Exit" "Apply configuration and exit installer" \
		"Add User" "Add a user to the system" \
		"Root Password" "Change root password" \
		"Hostname" "Set system hostname" \
		"Network" "Networking configuration" \
		"Services" "Set daemons to run on startup" \
		"Time Zone" "Set system timezone" \
		"Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3)
	exec 3>&-

	case "$REVISIT" in
	"Add User")
		bsdinstall adduser
		finalconfig
		;;
	"Root Password")
		bsdinstall rootpass 
		finalconfig
		;;
	"Hostname")
		bsdinstall hostname
		finalconfig
		;;
	"Network")
		bsdinstall netconfig
		finalconfig
		;;
	"Services")
		bsdinstall services
		finalconfig
		;;
	"Time Zone")
		bsdinstall time
		finalconfig
		;;
	"Handbook")
		bsdinstall docsinstall
		finalconfig
		;;
	esac
}

# Allow user to change his mind
finalconfig

trap error SIGINT	# SIGINT is bad again
bsdinstall config  || error

if [ ! -z "$BSDINSTALL_FETCHDEST" ]; then
	[ "$BSDINSTALL_FETCHDEST" != "$BSDINSTALL_DISTDIR" ] && \
	    umount "$BSDINSTALL_DISTDIR"
	rm -rf "$BSDINSTALL_FETCHDEST"
fi

dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
    --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0
if [ $? -eq 0 ]; then
	clear
	mount -t devfs devfs "$BSDINSTALL_CHROOT/dev"
	echo This shell is operating in a chroot in the new system. \
	    When finished making configuration changes, type \"exit\".
	chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
fi

echo "Installation Completed at $(date)" >> $BSDINSTALL_LOG

@


1.20
log
@SVN rev 242188 on 2012-10-27 19:56:57Z by dteske

Fix bug introduced by r241902 (MANIFEST uses TAB delimiter).

PR:		bin/173140
Approved by:	adrian (co-mentor)
@
text
@d27 1
a27 1
# $FreeBSD$
@


1.19
log
@SVN rev 241902 on 2012-10-22 18:14:27Z by dteske

Optimize syntax to use builtins and reduce unnecessary forking where possible.

Reviewed by:	nwhitehorn
Approved by:	adrian (co-mentor)
@
text
@d56 1
a56 1
	DISTMENU=`awk '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST`
@


1.18
log
@SVN rev 232531 on 2012-03-05 02:40:18Z by nwhitehorn

Make the chroot shell more functional by providing devfs.

Reported by:	Robert Simmons
MFC after:	4 days
@
text
@d56 1
a56 1
	DISTMENU=`cut -f 4,5,6 $BSDINSTALL_DISTDIR/MANIFEST | grep -v -e ^kernel -e ^base`
d59 6
a64 6
	EXTRA_DISTS=$(echo $DISTMENU | xargs dialog \
	    --backtitle "FreeBSD Installer" \
	    --title "Distribution Select" --nocancel --separate-output \
	    --checklist "Choose optional system components to install:" \
	    0 0 0 \
	2>&1 1>&3)
@


1.17
log
@SVN rev 228194 on 2011-12-02 02:05:26Z by nwhitehorn

Prevent user astonishment by providing the shell option at the end, after
any installer-provided configuration files have been copied. This allows
users to edit their fstab, if desired, and to see what the installer has
placed in rc.conf.

Requested by:	phk
MFC after:	1 day
@
text
@d219 1
@


1.16
log
@SVN rev 226507 on 2011-10-18 11:29:10Z by kensmith

Escape the newline so we get a proper line continuation.  Without this
the text of the menu selections doesn't get displayed properly and it
makes the installer appear to lock up for no obvious reason.

Reviewed by:	nwhitehorn
@
text
@d160 1
a160 1
	    "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices or apply more complex changes using a shell." 0 0 0 \
d168 1
a168 2
		"Handbook" "Install FreeBSD Handbook (requires network)" \
		"Shell" "Open a shell in the new system" 2>&1 1>&3)
a199 9
	"Shell")
		clear
		echo This shell is operating in a chroot in the new system. \
		    When finished making configuration changes, type \"exit\".
		chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
		# Don't hose local rc.conf changes
		cp $BSDINSTALL_CHROOT/etc/rc.conf $BSDINSTALL_TMPETC/rc.conf.manual
		finalconfig
		;;
d215 9
@


1.15
log
@SVN rev 226059 on 2011-10-06 14:24:37Z by nwhitehorn

Move "Exit" to the first entry in the list, so that it is the default
choice.

PR:		bin/160913
MFC after:	3 days
@
text
@d161 1
a161 1
		"Exit" "Apply configuration and exit installer"
@


1.14
log
@SVN rev 225637 on 2011-09-17 09:25:45Z by nwhitehorn

Inquire about terminal type if starting from a serial console and do
not configure the host's networking if netbooted [1]. Also fix FTP
installations behind some firewalls [2].

PR:		bin/159583 [2]
Reported by:	stas [1]
Approved by:	re (kib)
@
text
@d161 1
d169 1
a169 2
		"Shell" "Open a shell in the new system" \
		"Exit" "Apply configuration and exit installer" 2>&1 1>&3)
@


1.14.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.14.2.2
log
@SVN rev 226211 on 2011-10-10 13:58:33Z by nwhitehorn

MFC r226059:
Move "Exit" to the first entry in the list, so that it is the default
choice.

PR:		bin/160913
Approved by:	re (kib)
@
text
@a160 1
		"Exit" "Apply configuration and exit installer"
d168 2
a169 1
		"Shell" "Open a shell in the new system" 2>&1 1>&3)
@


1.14.2.3
log
@SVN rev 226511 on 2011-10-18 13:48:31Z by kensmith

MFC r226507:
> Escape the newline so we get a proper line continuation.  Without this
> the text of the menu selections doesn't get displayed properly and it
> makes the installer appear to lock up for no obvious reason.
>
> Reviewed by: nwhitehorn

Insta-MFC being done because 9.0-RC1 builds are being held for this.

Approved by:    re (kib, bz)
@
text
@d161 1
a161 1
		"Exit" "Apply configuration and exit installer" \
@


1.14.2.4
log
@SVN rev 228240 on 2011-12-03 17:15:16Z by nwhitehorn

MFC r228194:

Prevent user astonishment by providing the shell option at the end, after
any installer-provided configuration files have been copied. This allows
users to edit their fstab, if desired, and to see what the installer has
placed in rc.conf.

Requested by:	phk
Approved by:	re (kensmith)
@
text
@d160 1
a160 1
	    "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \
d168 2
a169 1
		"Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3)
d201 9
a224 9
dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
    --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0
if [ $? -eq 0 ]; then
	clear
	echo This shell is operating in a chroot in the new system. \
	    When finished making configuration changes, type \"exit\".
	chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
fi

@


1.14.2.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: stable/9/usr.sbin/bsdinstall/scripts/auto 228240 2011-12-03 17:15:16Z nwhitehorn $
@


1.14.2.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248237
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d27 1
a27 1
# $FreeBSD: stable/9/usr.sbin/bsdinstall/scripts/auto 248237 2013-03-13 13:41:28Z nwhitehorn $
d56 1
a56 1
	DISTMENU=`awk -F'\t' '!/^(kernel|base)/{print $4,$5,$6}' $BSDINSTALL_DISTDIR/MANIFEST`
d59 6
a64 6
	EXTRA_DISTS=$( eval dialog \
	    --backtitle \"FreeBSD Installer\" \
	    --title \"Distribution Select\" --nocancel --separate-output \
	    --checklist \"Choose optional system components to install:\" \
	    0 0 0 $DISTMENU \
	2>&1 1>&3 )
a218 1
	mount -t devfs devfs "$BSDINSTALL_CHROOT/dev"
@


1.14.2.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/263956
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a3 1
# Copyright (c) 2013 Devin Teske
d27 1
a27 6
# $FreeBSD: stable/9/usr.sbin/bsdinstall/scripts/auto 263956 2014-03-31 01:04:40Z dteske $
#
############################################################ INCLUDES

BSDCFG_SHARE="/usr/share/bsdconfig"
. $BSDCFG_SHARE/common.subr || exit 1
d29 1
a29 1
############################################################ FUNCTIONS
a43 3
############################################################ MAIN

f_dprintf "Began Installation at %s" "$( date )"
d93 1
a93 1
rm -f $PATH_FSTAB
d111 1
a111 6
	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
d225 1
a225 4
bsdinstall entropy
bsdinstall umount

f_dprintf "Installation Completed at %s" "$( date )"
a226 3
################################################################################
# END
################################################################################
@


1.14.2.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/264437
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d28 1
a28 1
# $FreeBSD: stable/9/usr.sbin/bsdinstall/scripts/auto 264437 2014-04-14 01:18:02Z dteske $
d105 3
a107 13
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
d109 2
a110 9
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` || exit 1
exec 3>&-

case "$PARTMODE" in
"Guided")	# Guided
d114 1
a114 1
"Shell")	# Shell
d119 1
a119 1
"Manual")	# Manual
a127 4
"ZFS")	# ZFS
	bsdinstall zfsboot || error
	bsdinstall mount || error
	;;
@


1.14.2.4.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.14.2.4.2.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.1/usr.sbin/bsdinstall/scripts/auto 228240 2011-12-03 17:15:16Z nwhitehorn $
@


1.14.2.3.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.14.2.3.2.2
log
@SVN rev 228241 on 2011-12-03 17:17:32Z by nwhitehorn

MFC r228194, MF9 r228240:

Prevent user astonishment by providing the shell option at the end, after
any installer-provided configuration files have been copied. This allows
users to edit their fstab, if desired, and to see what the installer has
placed in rc.conf.

Requested by:	phk
Approved by:	re (kensmith)
@
text
@d160 1
a160 1
	    "Setup of your FreeBSD system is nearly complete. You can now modify your configuration choices. After this screen, you will have an opportunity to make more complex changes using a shell." 0 0 0 \
d168 2
a169 1
		"Handbook" "Install FreeBSD Handbook (requires network)" 2>&1 1>&3)
d201 9
a224 9
dialog --backtitle "FreeBSD Installer" --title "Manual Configuration" \
    --yesno "The installation is now finished. Before exiting the installer, would you like to open a shell in the new system to make any final manual modifications?" 0 0
if [ $? -eq 0 ]; then
	clear
	echo This shell is operating in a chroot in the new system. \
	    When finished making configuration changes, type \"exit\".
	chroot "$BSDINSTALL_CHROOT" /bin/sh 2>&1
fi

@


1.14.2.3.2.3
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.0/usr.sbin/bsdinstall/scripts/auto 228241 2011-12-03 17:17:32Z nwhitehorn $
@


1.13
log
@SVN rev 223897 on 2011-07-09 23:01:54Z by nwhitehorn

Per request of the docs team, install docs as packages, instead of via
the normal distfile mechanism. Thanks to Marc Fonvieille for the patch and
for putting up with me taking entirely too long to commit this!

Submitted by:	blackend
@
text
@d38 1
a38 1
		exit
d131 2
a132 5
	fi

	# Otherwise, fetch everything
	if [ $? -ne 0 ]; then
		export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
d136 1
@


1.12
log
@SVN rev 222607 on 2011-06-02 13:57:49Z by nwhitehorn

Fix opening a shell on the new system (prevent the shell's stderr from
ending up in the install log).
@
text
@d130 1
a130 1
		mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
d169 1
d199 4
@


1.11
log
@SVN rev 222425 on 2011-05-28 16:15:46Z by nwhitehorn

Fix shell-based partitioning.
@
text
@d202 1
a202 1
		chroot "$BSDINSTALL_CHROOT" /bin/sh
@


1.10
log
@SVN rev 220834 on 2011-04-19 13:54:51Z by nwhitehorn

Fix mirror selection, which was broken by stderr redirection.

Reported by:	Garrett Cooper
@
text
@d108 1
a108 1
	sh
@


1.9
log
@SVN rev 220499 on 2011-04-09 14:18:03Z by nwhitehorn

Rename the "Reboot" option to "Exit", which reflects what it actually
does. The rc.local wrapper script will also soon grow an option to use the
live environment after installation, so an immediate reboot isn't even
necessarily implied.
@
text
@d86 1
a86 1
	BSDINSTALL_DISTSITE=`bsdinstall mirrorselect 2>&1 1>&3`
@


1.8
log
@SVN rev 220089 on 2011-03-28 04:29:50Z by nwhitehorn

Committing while tired is never a good idea. Remove an unconditional error
exit left over from debugging.
@
text
@d170 1
a170 1
		"Reboot" "Apply configuration and reboot" 2>&1 1>&3)
@


1.7
log
@SVN rev 220088 on 2011-03-28 02:37:05Z by nwhitehorn

Improve error handling.
@
text
@a142 2
error

@


1.6
log
@SVN rev 220080 on 2011-03-27 23:43:32Z by nwhitehorn

Add mirror selection for FTP installs. To support TBEMD installs
(e.g. powerpc64), this looks in a slightly different default path than now,
specifying both $MACHINE and $MACHINE_ARCH:
MIRROR/pub/FreeBSD/releases/`uname -p`/`uname -m`/`uname -r`

How to handle TBEMD properly probably merits some more discussion, but,
since no such 9.0-CURRENT distfiles exist at the moment, all existing
mirrors presently fail anyway.
@
text
@d32 2
a39 2
		test -n $DISTDIR_IS_UNIONFS && umount -f $BSDINSTALL_DISTDIR
		test -f $PATH_FSTAB && bsdinstall umount
d84 1
a84 1
if [ -n "$FETCH_DISTRIBUTIONS" -a -z "$BSDINSTALL_DISTSITE" ]; then
d128 1
a128 2
	if [ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != \
	    "$ALL_DISTRIBUTIONS" ]; then
@


1.5
log
@SVN rev 219615 on 2011-03-13 17:15:31Z by nwhitehorn

Add generation of an installation manifest containing SHA256 checksums as
well as package descriptions and add code in the installer to check the
checksums.
@
text
@d38 1
d76 1
d78 1
a78 1
if [ ! -z "$FETCH_DISTRIBUTIONS" -a ! -z $BSDINSTALL_CONFIGCURRENT ]; then
d84 9
d128 5
a132 1
	[ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != "$ALL_DISTRIBUTIONS" ] && mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
d144 2
@


1.4
log
@SVN rev 219528 on 2011-03-11 19:40:49Z by nwhitehorn

Correct typo.
@
text
@a52 16
LIB32=""
[ `uname -p` = amd64 -o `uname -p` = powerpc64 ] && \
    LIB32="lib32 \"32-bit compatibility\" on"

DISTMENU="doc	\"Additional documentation\" on \
	games	\"Games (fortune, etc.)\" on \
	$LIB32 \
	ports	\"Ports tree\" on \
	src	\"System source code\" off"

exec 3>&1
EXTRA_DISTS=$(echo $DISTMENU | xargs dialog --backtitle "FreeBSD Installer" \
    --title "Distribution Select" --nocancel --separate-output \
    --checklist "Choose optional system components to install:" \
    0 0 0 \
2>&1 1>&3)
d54 14
a67 3
for dist in $EXTRA_DISTS; do
	export DISTRIBUTIONS="$DISTRIBUTIONS $dist.txz"
done
d129 1
@


1.3
log
@SVN rev 219179 on 2011-03-02 15:41:00Z by nwhitehorn

Make installations work when no optional components are selected.
@
text
@d117 1
a117 1
	BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/bsdinstall-dist"
@


1.2
log
@SVN rev 218947 on 2011-02-22 13:56:59Z by nwhitehorn

Add support for optional distributions, installation of the ports tree and
src. Fitting all of this on a single CD along with a full system requires
changing the default compression algorithm from gzip to xz.
@
text
@d69 1
a69 1
DISTRIBUTIONS="base.txz kernel.txz"
@


1.1
log
@SVN rev 218799 on 2011-02-18 14:54:34Z by nwhitehorn

Import bsdinstall. This is meant to be (eventually in conjunction with
pc-sysinstall) a replacement for sysinstall in the 9.0 release and beyond.
Currently supported platforms are sparc64, pc98, i386, amd64, powerpc, and
powerpc64. Integration into the build system will occur in the coming
weeks.

Merging with pc-sysinstall will use this code as a frontend, while
temporarily retaining the interactive partition editor here. This work
will be done in parallel with improvements on this code and release
integration.

Thanks to all who have provided testing and comments!
@
text
@d53 21
@

