aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorofthesun9 <[email protected]>2023-03-15 00:40:55 +0100
committerGitHub <[email protected]>2023-03-14 16:40:55 -0700
commit8b7342d2904dbcdbbf96279c06ae8cb10948fb8a (patch)
tree497e3857c1031bc91edd679af10b09a321e3bf17
parentfe6a7b787f9f94ad6c6ee281341e6e07e3dd976c (diff)
Fix for mountpoint=legacy
We need to clear mountpoint only after checking it. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Richard Yao <[email protected]> Signed-off-by: ofthesun9 <[email protected]> Closes #14599 Closes #14604
-rw-r--r--contrib/initramfs/scripts/zfs5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index 97d471cc8..23aa95efc 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -359,11 +359,12 @@ mount_fs()
# isn't the root fs.
return 0
fi
- # Last hail-mary: Hope 'rootmnt' is set!
- mountpoint=""
+ # Don't use mount.zfs -o zfsutils for legacy mountpoint
if [ "$mountpoint" = "legacy" ]; then
ZFS_CMD="mount.zfs"
fi
+ # Last hail-mary: Hope 'rootmnt' is set!
+ mountpoint=""
else
mountpoint="$mountpoint1"
fi