Skip to content

Commit

Permalink
Fix for mountpoint=legacy
Browse files Browse the repository at this point in the history
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 openzfs#14599
Closes openzfs#14604
  • Loading branch information
ofthesun9 authored and behlendorf committed Mar 15, 2023
1 parent 4b3133e commit a5c469c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions contrib/initramfs/scripts/zfs
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,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
Expand Down

0 comments on commit a5c469c

Please sign in to comment.