Tolerate different spellings of yaboot append
authorColin Watson <cjwatson@debian.org>
Thu, 19 Jan 2017 21:12:14 +0000 (21:12 +0000)
committerColin Watson <cjwatson@debian.org>
Thu, 19 Jan 2017 21:12:17 +0000 (21:12 +0000)
Make the yaboot parser more tolerant about the syntax of "append"
options (thanks, Hedayat Vatankhah; closes: #674561).

debian/changelog
linux-boot-probes/mounted/powerpc/40yaboot

index 3e908af..921eb18 100644 (file)
@@ -17,6 +17,8 @@ os-prober (1.72) UNRELEASED; urgency=medium
   * Fix detection of /usr/ partition as a GNU/Linux root partition when
     /lib* directories are moved to /usr/ completely (thanks, Hedayat
     Vatankhah; closes: #698733).
+  * Make the yaboot parser more tolerant about the syntax of "append"
+    options (thanks, Hedayat Vatankhah; closes: #674561).
 
  -- Colin Watson <cjwatson@debian.org>  Sat, 31 Dec 2016 17:11:49 +0000
 
index 26d8a16..2bb6765 100755 (executable)
@@ -74,8 +74,8 @@ parse_yaboot_conf () {
                                kernel="$(dequote "$2")"
                        ;;
                        append)
-                               shift 1
-                               parameters="$(dequote "${line#append=}")"
+                               cleanappend=`printf %s "$line" | sed 's/append\([[:space:]]\)*=\([[:space:]]\)*//'`
+                               parameters="$(dequote "$cleanappend")"
                        ;;
                        initrd)
                                initrd="$(dequote "$2")"