Commit a320e9dd authored by Brad Davis's avatar Brad Davis
Browse files

bsdinstall: improve zfsboots ability to handle datasets under a BE

Currently we only set canmount=noauto on the root of the BE, this
change makes it so we set it on all datasets under the BE as well.

Reviewed by:	allanjude
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:
parent 79588897
......@@ -1473,9 +1473,18 @@ zfs_create_boot()
# Set canmount=noauto so that the default Boot Environment (BE) does
# not get mounted if a different BE is selected from the beastie menu
f_dprintf "$funcname: Set canmount=noauto for the root of the pool..."
f_eval_catch $funcname zfs "$ZFS_SET" "canmount=noauto" \
f_dprintf "$funcname: Set canmount=noauto for any datasets under the BE..."
echo "$ZFSBOOT_DATASETS" | while read dataset options; do
# Skip blank lines and comments
case "$dataset" in "#"*|"") continue; esac
f_eval_catch $funcname zfs "$ZFS_SET" "canmount=noauto" \
"$zroot_name$dataset" || return $FAILURE ;;
*) continue ;;
# Last, but not least... required lines for rc.conf(5)/loader.conf(5)
# NOTE: We later concatenate these into their destination
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment