summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralaviss <[email protected]>2019-10-30 21:38:41 +0000
committerBrian Behlendorf <[email protected]>2019-10-30 14:38:41 -0700
commit936e2d6d3ea8745d8a4148ec9fa7b060fd64448a (patch)
tree572461f362e6289ff58a900f1c60b4d18cc4ce54
parentf63e2fe132588fab595f3524afd14bc4b4e0386b (diff)
dracut/zfs-load-key.sh: properly remove prefixes
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 <[email protected]> Reviewed-by: Dacian Reece-Stremtan <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Hiếu Lê <[email protected]> Closes #9520
-rwxr-xr-xcontrib/dracut/90zfs/zfs-load-key.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in
index 42dc1d08f..3f466798e 100755
--- a/contrib/dracut/90zfs/zfs-load-key.sh.in
+++ b/contrib/dracut/90zfs/zfs-load-key.sh.in
@@ -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'