Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,14 @@ mount_fs()
# Check that the filesystem exists
"${ZFS}" list -oname -tfilesystem -H "${fs}" > /dev/null 2>&1 || return 1

# Skip filesystems with canmount=off. The root fs should not have
# canmount=off, but ignore it for backwards compatibility just in case.
# Skip filesystems not set to canmount=on (i.e. off or noauto), except if set as bootfs.
# The bootfs should not have canmount=off (not be just a placehlder/inheritance provider),
# but we also ignore 'off' for backwards compatibility just in case (top-level canmount=off
# boot pool).
if [ "$fs" != "${ZFS_BOOTFS}" ]
then
canmount=$(get_fs_value "$fs" canmount)
[ "$canmount" = "off" ] && return 0
[ "$canmount" != "on" ] && return 0
fi

# Need the _original_ datasets mountpoint!
Expand Down
Loading