summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsdinstall/scripts/auto
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2011-03-27 23:43:32 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2011-03-27 23:43:32 +0000
commit605fa95a3a5b2ad0a37ecabdc1a9eac27489629c (patch)
treec871afafa597778bfec291cadf8ffc898899a6be /usr.sbin/bsdinstall/scripts/auto
parent42e994cbec564b754bf9f8246495852233198cae (diff)
downloadFreeBSD-src-605fa95a3a5b2ad0a37ecabdc1a9eac27489629c.zip
FreeBSD-src-605fa95a3a5b2ad0a37ecabdc1a9eac27489629c.tar.gz
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.
Diffstat (limited to 'usr.sbin/bsdinstall/scripts/auto')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/auto21
1 files changed, 19 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
index a857edc..8e28862 100755
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -35,6 +35,7 @@ error() {
if [ $? -ne 0 ]; then
exit
else
+ test -n $DISTDIR_IS_UNIONFS && umount -f $BSDINSTALL_DISTDIR
test -f $PATH_FSTAB && bsdinstall umount
exec $0
fi
@@ -72,13 +73,23 @@ for dist in $DISTRIBUTIONS; do
FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
fi
done
+FETCH_DISTRIBUTIONS=`echo $FETCH_DISTRIBUTIONS` # Trim white space
-if [ ! -z "$FETCH_DISTRIBUTIONS" -a ! -z $BSDINSTALL_CONFIGCURRENT ]; then
+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" -a -z "$BSDINSTALL_DISTSITE" ]; then
+ exec 3>&1
+ BSDINSTALL_DISTSITE=`bsdinstall 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
@@ -114,7 +125,11 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
export DISTRIBUTIONS="$FETCH_DISTRIBUTIONS"
# Try to use any existing distfiles
- [ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != "$ALL_DISTRIBUTIONS" ] && mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
+ if [ -d $BSDINSTALL_DISTDIR -a "$FETCH_DISTRIBUTIONS" != \
+ "$ALL_DISTRIBUTIONS" ]; then
+ DISTDIR_IS_UNIONFS=1
+ mount_unionfs "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
+ fi
# Otherwise, fetch everything
if [ $? -ne 0 ]; then
@@ -126,6 +141,8 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
fi
+error
+
bsdinstall checksum || error
bsdinstall distextract || error
bsdinstall rootpass || error
OpenPOWER on IntegriCloud