Index: usr.sbin/bsdinstall/scripts/script =================================================================== --- usr.sbin/bsdinstall/scripts/script +++ usr.sbin/bsdinstall/scripts/script @@ -53,8 +53,6 @@ error() { - [ -f "$PATH_FSTAB" ] && bsdinstall umount - local file f_getvar "$VAR_DEBUG_FILE#+" file if [ "$file" ]; then @@ -63,6 +61,14 @@ # No need to restore title, pining for the fjords fi + [ ! -f "$PATH_FSTAB" ] && exit 1 + if [ "$ZFSBOOT_DISKS" ]; then + zfs umount -a + umount $BSDINSTALL_CHROOT + else + bsdinstall umount + fi + exit 1 } @@ -99,8 +105,8 @@ bsdinstall zfsboot else bsdinstall scriptedpart "$PARTITIONS" + bsdinstall mount fi -bsdinstall mount # Fetch distributions # NB: distfetch is not suitable because it requires a tty. @@ -138,7 +144,12 @@ fi bsdinstall entropy -bsdinstall umount +if [ "$ZFSBOOT_DISKS" ]; then + zfs umount -a + umount $BSDINSTALL_CHROOT +else + bsdinstall umount +fi f_dprintf "Installation Completed at %s" "$( date )"