From 5187a14f54d9ddf72405d05e5f953151f787c3c1 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 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'