From owner-svn-src-stable-11@freebsd.org Mon May 29 11:37:10 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BCB3CFC97F; Mon, 29 May 2017 11:37:10 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C70D75DC7; Mon, 29 May 2017 11:37:10 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4TBb9IQ060534; Mon, 29 May 2017 11:37:09 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4TBb9GT060533; Mon, 29 May 2017 11:37:09 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201705291137.v4TBb9GT060533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 29 May 2017 11:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r319124 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 11:37:10 -0000 Author: royger Date: Mon May 29 11:37:08 2017 New Revision: 319124 URL: https://svnweb.freebsd.org/changeset/base/319124 Log: MFC r318632, r318633: bsdinstall: mount is not needed for the ZFS install case bsdinstall: do not use distextract in scripted mode Modified: stable/11/usr.sbin/bsdinstall/scripts/script Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/script ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/script Mon May 29 11:16:59 2017 (r319123) +++ stable/11/usr.sbin/bsdinstall/scripts/script Mon May 29 11:37:08 2017 (r319124) @@ -42,6 +42,11 @@ f_include $BSDCFG_SHARE/variable.subr # DISTRIBUTIONS # BSDINSTALL_DISTDIR +# +# Default name of the ZFS boot-pool +# +: ${ZFSBOOT_POOL_NAME:=zroot} + ############################################################ GLOBALS # @@ -53,8 +58,6 @@ msg_installation_error="Installation Err error() { - [ -f "$PATH_FSTAB" ] && bsdinstall umount - local file f_getvar "$VAR_DEBUG_FILE#+" file if [ "$file" ]; then @@ -63,6 +66,13 @@ error() # No need to restore title, pining for the fjords fi + [ -f "$PATH_FSTAB" ] || exit + if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME + else + bsdinstall umount + fi + exit 1 } @@ -99,12 +109,15 @@ if [ "$ZFSBOOT_DISKS" ]; then bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Unpack distributions bsdinstall checksum -bsdinstall distextract +for set in $DISTRIBUTIONS; do + f_dprintf "Extracting $BSDINSTALL_DISTDIR/$set" + tar -xf "$BSDINSTALL_DISTDIR/$set" -C $BSDINSTALL_CHROOT +done # Finalize install bsdinstall config @@ -125,7 +138,11 @@ if [ -f /tmp/bsdinstall-installscript-ab fi bsdinstall entropy -bsdinstall umount +if [ "$ZFSBOOT_DISKS" ]; then + zpool export $ZFSBOOT_POOL_NAME +else + bsdinstall umount +fi f_dprintf "Installation Completed at %s" "$( date )"