Skip to content

Commit

Permalink
dracut/zfs-load-key.sh: properly remove prefixes
Browse files Browse the repository at this point in the history
Removes the 'ZFS=' prefix from $BOOTFS instead of $root. This makes sure
that the 'zfs:' prefix remains stripped so that users with
'root=zfs:dataset' cmdline can have key loaded on boot again.

Reviewed-by: Garrett Fields <ghfields@gmail.com>
Reviewed-by: Dacian Reece-Stremtan <dacianstremtan@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Hiếu Lê <leorize+oss@disroot.org>
Closes openzfs#9520
  • Loading branch information
alaviss authored and tonyhutter committed Dec 27, 2019
1 parent 9ea68a8 commit d0486fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/dracut/90zfs/zfs-load-key.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ "${root}" = "zfs:AUTO" ] ; then
BOOTFS="$(zpool list -H -o bootfs | awk '$1 != "-" {print; exit}')"
else
BOOTFS="${root##zfs:}"
BOOTFS="${root##ZFS=}"
BOOTFS="${BOOTFS##ZFS=}"
fi

# if pool encryption is active and the zfs command understands '-o encryption'
Expand Down

0 comments on commit d0486fb

Please sign in to comment.