Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2015 18:53:36 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r278527 - projects/release-install-debug/usr.sbin/bsdinstall/scripts
Message-ID:  <201502101853.t1AIrahf058657@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Tue Feb 10 18:53:35 2015
New Revision: 278527
URL: https://svnweb.freebsd.org/changeset/base/278527

Log:
  Provide a mechanism to differentiate installation distribution sets
  between local and remote sources.  This is needed in order to enable
  MK_DEBUG_FILES by default, since the debug distribution sets will
  not be included on the installer medium.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto

Modified: projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto
==============================================================================
--- projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto	Tue Feb 10 18:49:13 2015	(r278526)
+++ projects/release-install-debug/usr.sbin/bsdinstall/scripts/auto	Tue Feb 10 18:53:35 2015	(r278527)
@@ -80,16 +80,20 @@ if [ -f $BSDINSTALL_DISTDIR/MANIFEST ]; 
 	done
 fi
 
+LOCAL_DISTRIBUTIONS=""
 FETCH_DISTRIBUTIONS=""
 for dist in $DISTRIBUTIONS; do
 	if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
 		FETCH_DISTRIBUTIONS="$FETCH_DISTRIBUTIONS $dist"
+	else
+		LOCAL_DISTRIBUTIONS="$LOCAL_DISTRIBUTIONS $dist"
 	fi
 done
+LOCAL_DISTRIBUTIONS=`echo $LOCAL_DISTRIBUTIONS`	# Trim white space
 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
+	dialog --backtitle "FreeBSD Installer" --title "Network Installation" --msgbox "Some installation files were not 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
@@ -168,15 +172,20 @@ if [ ! -z "$FETCH_DISTRIBUTIONS" ]; then
 		DISTDIR_IS_UNIONFS=1
 		mount_nullfs -o union "$BSDINSTALL_FETCHDEST" "$BSDINSTALL_DISTDIR"
 	else
-		export DISTRIBUTIONS="MANIFEST $ALL_DISTRIBUTIONS"
+		export DISTRIBUTIONS="MANIFEST $FETCH_DISTRIBUTIONS"
 		export BSDINSTALL_DISTDIR="$BSDINSTALL_FETCHDEST"
 	fi
 		
 	export FTP_PASSIVE_MODE=YES
-	bsdinstall distfetch || error "Failed to fetch distribution"
+	bsdinstall distfetch || error "Failed to fetch remote distribution"
 	export DISTRIBUTIONS="$ALL_DISTRIBUTIONS"
 fi
 
+if [ ! -z "$LOCAL_DISTRIBUTIONS" ]; then
+	env DISTRIBUTIONS="$LOCAL_DISTRIBUTIONS" bsdinstall distfetch || \
+		error "Failed to fetch distribution from local media"
+fi
+
 bsdinstall checksum || error "Distribution checksum failed"
 bsdinstall distextract || error "Distribution extract failed"
 bsdinstall rootpass || error "Could not set root password"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502101853.t1AIrahf058657>