aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2023-02-06 14:16:01 -0500
committerGitHub <[email protected]>2023-02-06 11:16:01 -0800
commiteb823cbc76d28a7cafdf6a7aafdefe7e74fe26bc (patch)
treefdcf1948282dea79aeae9c88a36a1217f36caef3 /contrib
parent66953686c05901277115e837bbaab4df4ffd63c6 (diff)
initramfs: Make mountpoint=none work
In initramfs, mount.zfs fails to mount a dataset with mountpoint=none, but mount.zfs -o zfsutil works. Use -o zfsutil when mountpoint=none. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #14455
Diffstat (limited to 'contrib')
-rw-r--r--contrib/initramfs/scripts/zfs4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index 41a4d96f8..d1a99e4a8 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -359,9 +359,11 @@ mount_fs()
# isn't the root fs.
return 0
fi
- ZFS_CMD="mount.zfs"
# Last hail-mary: Hope 'rootmnt' is set!
mountpoint=""
+ if [ "$mountpoint" = "legacy" ]; then
+ ZFS_CMD="mount.zfs"
+ fi
else
mountpoint="$mountpoint1"
fi