Date: Mon, 22 May 2017 11:38:39 +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-head@freebsd.org Subject: svn commit: r318632 - head/usr.sbin/bsdinstall/scripts Message-ID: <201705221138.v4MBcdgw070249@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: royger Date: Mon May 22 11:38:39 2017 New Revision: 318632 URL: https://svnweb.freebsd.org/changeset/base/318632 Log: bsdinstall: mount is not needed for the ZFS install case Because the datasets are already mounted by zfsboot, and the mount script doesn't know anything about ZFS. Also do not execute the "umount" script for ZFS for the same reasons. Reviewed by: dteske, tsoome Sponsored by: Citrix Systems R&D MFC after: 1 week Differential revision: https://reviews.freebsd.org/D10738 Modified: head/usr.sbin/bsdinstall/scripts/script Modified: head/usr.sbin/bsdinstall/scripts/script ============================================================================== --- head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:33:44 2017 (r318631) +++ head/usr.sbin/bsdinstall/scripts/script Mon May 22 11:38:39 2017 (r318632) @@ -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,8 +109,8 @@ if [ "$ZFSBOOT_DISKS" ]; then bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Unpack distributions bsdinstall checksum @@ -125,7 +135,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?201705221138.v4MBcdgw070249>