sed off (hdn,n) from the front of an initrd path, as seen in Mandriva/Mageia grub...
authorChristian Perrier <bubulle@debian.org>
Mon, 7 May 2012 20:13:19 +0000 (22:13 +0200)
committerChristian Perrier <bubulle@debian.org>
Mon, 7 May 2012 20:13:19 +0000 (22:13 +0200)
debian/changelog
linux-boot-probes/mounted/x86/40grub

index 03f2b49..8dc65b9 100644 (file)
@@ -1,3 +1,12 @@
+os-prober (1.53) UNRELEASED; urgency=low
+
+  * sed off (hdn,n) from the front of an initrd path,
+    as seen in Mandriva/Mageia grub configs.
+    Thanks to François Jaouen and Barry Jackson for the patch
+    Closes: #566102
+
+ -- Christian Perrier <bubulle@debian.org>  Mon, 07 May 2012 22:11:19 +0200
+
 os-prober (1.52) unstable; urgency=low
 
   [ Stéphane Graber ]
index b280eac..08f6605 100755 (executable)
@@ -64,7 +64,9 @@ parse_grub_menu () {
                                fi
                        ;;
                        initrd)
-                               initrd="$2"
+                               # Hack alert take 2: sed off any (hdn,n)
+                               # See #566102
+                               initrd="$(echo "$2" | sed 's/(.*)//')"
                                # Initrd same.
                                if [ "$partition" != "$bootpart" ]; then
                                        initrd="/boot$initrd"