From 936e2d6d3ea8745d8a4148ec9fa7b060fd64448a Mon Sep 17 00:00:00 2001 From: alaviss Date: Wed, 30 Oct 2019 21:38:41 +0000 Subject: [PATCH] dracut/zfs-load-key.sh: properly remove prefixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Dacian Reece-Stremtan Reviewed-by: Brian Behlendorf Signed-off-by: Hiếu Lê Closes #9520 --- contrib/dracut/90zfs/zfs-load-key.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in index 42dc1d08f3..3f466798e7 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'