From b0aad982a48559842ae84d50035b98311891d7ca Mon Sep 17 00:00:00 2001 From: Leorize Date: Mon, 28 Oct 2019 17:15:48 +0700 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. Signed-off-by: Hiếu Lê --- 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 42dc1d08f3d2..3f466798e72a 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'