summarylogtreecommitdiffstats
path: root/os-prober-multiple-initrd.patch
diff options
context:
space:
mode:
authorlibrewish2021-09-12 20:30:34 +0530
committerlibrewish2021-09-12 20:30:34 +0530
commit752ceb29fd23a6c4cffbca9f65adad1cb53f4872 (patch)
treea41fd50e983356d81f724b91463f8855bae07d9a /os-prober-multiple-initrd.patch
parent5271f23d8ac140f2db82697b645c38a41ccc78ac (diff)
downloadaur-752ceb29fd23a6c4cffbca9f65adad1cb53f4872.tar.gz
add patches from opensuse
Diffstat (limited to 'os-prober-multiple-initrd.patch')
-rw-r--r--os-prober-multiple-initrd.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/os-prober-multiple-initrd.patch b/os-prober-multiple-initrd.patch
new file mode 100644
index 00000000000..e390bc259d4
--- /dev/null
+++ b/os-prober-multiple-initrd.patch
@@ -0,0 +1,33 @@
+Index: os-prober/linux-boot-probes/mounted/common/40grub2
+===================================================================
+--- os-prober.orig/linux-boot-probes/mounted/common/40grub2
++++ os-prober/linux-boot-probes/mounted/common/40grub2
+@@ -19,11 +19,11 @@ entry_result () {
+ # if path is not relative to subvolume make it relative
+ kernel=${kernel#${bsv}}
+ kernelfile=$kernel
+- initrd=${initrd#${bsv}}
++ initrd=`echo $initrd | sed -e "s!^${bsv}!!" -e "s!\\(\\s\\)${bsv}!\\1!g"`
+ if [ "x$GRUB_FS" != "xbtrfs" -o "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" != "xtrue" ]; then
+ # absolute path needed: prepend subvolume if $kernel isn't empty
+ kernel=${kernel:+${bsv}}${kernel}
+- initrd=${initrd:+${bsv}}${initrd}
++ initrd=`echo $initrd | sed -e "s!\\(\\S\\+\\)!${bsv}\\1!g"`
+ fi
+ # assumed: rootsv != bootsv if rootsv isn't ancestor of bootsv
+ [ "$partition" != "$bootpart" -o "$rootsv" != "$bootsv" ] && kernelfile="/boot${kernelfile}"
+@@ -105,10 +105,11 @@ parse_grub_menu () {
+ fi
+ ;;
+ initrd|initrdefi|initrd16)
+- initrd="$(echo "$2" | sed 's/(.*)//')"
++ shift
++ initrd="$(echo "$@" | sed 's/(\S*)//g')"
+ # Initrd same.
+ if [ "$partition" != "$bootpart" -a "$type" != "btrfs" ]; then
+- initrd="/boot$initrd"
++ initrd=`echo $initrd | sed -e 's!\(\S\+\)!/boot\1!g'`
+ fi
+ ;;
+ "}")
+