Date: Mon, 29 May 2017 11:37:09 +0000 (UTC) From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org> 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 Message-ID: <201705291137.v4TBb9GT060533@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 )"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705291137.v4TBb9GT060533>