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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #14455
This commit is contained in:
Ryan Moeller 2023-02-06 14:16:01 -05:00 committed by GitHub
parent 66953686c0
commit eb823cbc76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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