]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
templates: Properly handle multiple initrd paths in 30_os-prober
authorPeter Levine <plevine457@gmail.com>
Wed, 23 Feb 2022 04:35:02 +0000 (23:35 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 7 Mar 2022 14:39:25 +0000 (15:39 +0100)
os-prober now effectively handles multiple paths passed to initrd, but
grub-mkconfig still truncates off any subsequent space-delimited paths.

Support proper parsing of space-delimited initrd paths passed from
os-prober for distributions, like Manjaro, that require it.

Fixes: https://savannah.gnu.org/bugs/?47681
Signed-off-by: Peter Levine <plevine457@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/30_os-prober.in

index 5984e92d29116c72e60e5548199afb4bc9d5337d..daa60377806799b6c08f52327a990c96415f5800 100644 (file)
@@ -210,7 +210,7 @@ EOF
         LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
         LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
         LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
-        LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
+        LINITRD="`echo ${LINUX} | cut -d ':' -f 5 | tr '^' ' '`"
         LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
 
         if [ -z "${LLABEL}" ] ; then