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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: ofthesun9 <olivier@ofthesun.net>
Closes #14599
Closes #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.