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
This commit is contained in:
Roger Pau Monné 2017-05-22 11:38:39 +00:00
parent 477a40c74f
commit 2f34d6c344

View File

@ -42,6 +42,11 @@ f_include $BSDCFG_SHARE/variable.subr
# DISTRIBUTIONS # DISTRIBUTIONS
# BSDINSTALL_DISTDIR # BSDINSTALL_DISTDIR
#
# Default name of the ZFS boot-pool
#
: ${ZFSBOOT_POOL_NAME:=zroot}
############################################################ GLOBALS ############################################################ GLOBALS
# #
@ -53,8 +58,6 @@ msg_installation_error="Installation Error!"
error() error()
{ {
[ -f "$PATH_FSTAB" ] && bsdinstall umount
local file local file
f_getvar "$VAR_DEBUG_FILE#+" file f_getvar "$VAR_DEBUG_FILE#+" file
if [ "$file" ]; then if [ "$file" ]; then
@ -63,6 +66,13 @@ error()
# No need to restore title, pining for the fjords # No need to restore title, pining for the fjords
fi fi
[ -f "$PATH_FSTAB" ] || exit
if [ "$ZFSBOOT_DISKS" ]; then
zpool export $ZFSBOOT_POOL_NAME
else
bsdinstall umount
fi
exit 1 exit 1
} }
@ -99,8 +109,8 @@ if [ "$ZFSBOOT_DISKS" ]; then
bsdinstall zfsboot bsdinstall zfsboot
else else
bsdinstall scriptedpart "$PARTITIONS" bsdinstall scriptedpart "$PARTITIONS"
bsdinstall mount
fi fi
bsdinstall mount
# Unpack distributions # Unpack distributions
bsdinstall checksum bsdinstall checksum
@ -125,7 +135,11 @@ if [ -f /tmp/bsdinstall-installscript-ab ]; then
fi fi
bsdinstall entropy bsdinstall entropy
bsdinstall umount if [ "$ZFSBOOT_DISKS" ]; then
zpool export $ZFSBOOT_POOL_NAME
else
bsdinstall umount
fi
f_dprintf "Installation Completed at %s" "$( date )" f_dprintf "Installation Completed at %s" "$( date )"