contrib: dracut: parse-zfs: stop pretending we support FILESYSTEM=

It was added in the original ae26d0465a ("Add dracut support") commit
in 2011, and was then broken a bit later with the advent of
dracut-zfs-generator, or maybe earlier as part of other churn

Either way, it's broken, and has been in 2.0+ as well, and no-one
complained. Stop pretending we support it at all

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13291
This commit is contained in:
наб 2022-04-04 20:59:53 +02:00 committed by Brian Behlendorf
parent 47636f5661
commit 2c74617bcf
1 changed files with 1 additions and 4 deletions

View File

@ -29,18 +29,15 @@ case "${root}" in
info "ZFS: Enabling autodetection of bootfs after udev settles." info "ZFS: Enabling autodetection of bootfs after udev settles."
;; ;;
ZFS=*|zfs:*|FILESYSTEM=*) ZFS=*|zfs:*)
# root is explicit ZFS root. Parse it now. We can handle # root is explicit ZFS root. Parse it now. We can handle
# a root=... param in any of the following formats: # a root=... param in any of the following formats:
# root=ZFS=rpool/ROOT # root=ZFS=rpool/ROOT
# root=zfs:rpool/ROOT # root=zfs:rpool/ROOT
# root=zfs:FILESYSTEM=rpool/ROOT
# root=FILESYSTEM=rpool/ROOT
# root=ZFS=pool+with+space/ROOT+WITH+SPACE (translates to root=ZFS=pool with space/ROOT WITH SPACE) # root=ZFS=pool+with+space/ROOT+WITH+SPACE (translates to root=ZFS=pool with space/ROOT WITH SPACE)
# Strip down to just the pool/fs # Strip down to just the pool/fs
root="${root#zfs:}" root="${root#zfs:}"
root="${root#FILESYSTEM=}"
root="zfs:${root#ZFS=}" root="zfs:${root#ZFS=}"
# switch + with spaces because kernel cmdline does not allow us to quote parameters # switch + with spaces because kernel cmdline does not allow us to quote parameters
root=$(echo "$root" | tr '+' ' ') root=$(echo "$root" | tr '+' ' ')