]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(dracut-systemd): regression on root=block:
authorHarald Hoyer <harald@redhat.com>
Wed, 31 Mar 2021 14:14:02 +0000 (16:14 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Wed, 31 Mar 2021 19:31:57 +0000 (21:31 +0200)
Commit 3532978de04c7 introduced a regression, where the `root` could be
`root=block:block:/dev/foo`.

modules.d/98dracut-systemd/dracut-cmdline.sh

index 967b330dd5a4da3d5f46c93a84dc4bd9da11e7d3..44d5b31b966e1501037ac54545979b1a9ee99307 100755 (executable)
@@ -51,11 +51,11 @@ source_hook cmdline
 
 case "${root#block:}${root_unset}" in
     LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
-        root="block:$(label_uuid_to_dev "$root")"
+        root="block:$(label_uuid_to_dev "${root#block:}")"
         rootok=1
         ;;
     /dev/*)
-        root="block:${root}"
+        root="block:${root#block:}"
         rootok=1
         ;;
     UNSET | gpt-auto | tmpfs)