File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ get_sort_key() {
546546# returns: 0 iff at least one valid BE was found
547547
548548populate_be_list () {
549- local be_list fs mnt active candidates ret sort_key
549+ local be_list fs canmount mnt active candidates ret sort_key
550550
551551 be_list=" ${1} "
552552 if [ -z " ${be_list} " ]; then
@@ -561,7 +561,7 @@ populate_be_list() {
561561 : > " ${be_list} "
562562
563563 # Find valid BEs
564- while IFS=$' \t ' read -r fs mnt active; do
564+ while IFS=$' \t ' read -r fs canmount mnt active; do
565565 if [ " ${mnt} " = " /" ]; then
566566 # When mountpoint=/, BE is a candidate unless org.zfsbootmenu:active=off
567567 [ " ${active} " = " off" ] && continue
@@ -577,8 +577,13 @@ populate_be_list() {
577577 continue
578578 fi
579579
580+ # root datasets should never be automatically mounted by the boot environment
581+ if [ " ${canmount} " = " on" ]; then
582+ zwarn " canmount=on set for '${fs} ', should be canmount=noauto"
583+ fi
584+
580585 candidates+=( " ${fs} " )
581- done <<< " $(zfs list -H -o name,mountpoint,org.zfsbootmenu:active -S " ${sort_key} " )"
586+ done <<< " $(zfs list -H -o name,canmount, mountpoint,org.zfsbootmenu:active -S " ${sort_key} " )"
582587
583588 # put bootfs on the end, so it is shown first with --tac
584589 [ -n " ${BOOTFS} " ] && candidates+=( " ${BOOTFS} " )
You can’t perform that action at this time.
0 commit comments