When calling the script target with the ZFSBOOT_DISKS variable set, the zfsboot target will be run. This logic should also be used for the umount target, choosing 'zfs umount -a' to be run.
We can add 'zfs umount -a', but it's not a perfect, because I sometimes use bsdinstall in my workstation which use zfs on root partition, but it's uncommon usecase.
I've reported this to Devin some time ago, could you tell something? Maybe Allan?
Then, how about iterating over filesystems under $ZFSBOOT_POOL_NAME?
Revision with 'zfs umount -a' created:
I think you want to use:
zfs unmount $BSDINSTALL_CHROOT
To only unmount anything mounted under /mnt
Also, you should first check if any ZFS was actually used, as running a zfs command for the first time loads the ZFS kernel module, and you don't want to do that if the user just did a ufs only install
Revision updated, any ideas for optimalization?
For bugs that match the following
- Status Is In progress
- Untouched since 2018-01-01.
- Affects Base System OR Documentation
Reset to open status.
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.