]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix an infinite loop in grub-mkconfig
authorColin Watson <cjwatson@ubuntu.com>
Tue, 8 Jul 2014 22:54:30 +0000 (23:54 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 8 Jul 2014 22:54:30 +0000 (23:54 +0100)
* util/grub.d/10_hurd.in: Make kernel list progression not fail on
kernels whose paths contain regex metacharacters.
* util/grub.d/10_kfreebsd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/20_linux_xen.in: Likewise.

Reported by: Heimo Stranner.

ChangeLog
util/grub.d/10_hurd.in
util/grub.d/10_kfreebsd.in
util/grub.d/10_linux.in
util/grub.d/20_linux_xen.in

index 5109c5a61d10844de986ceeba98b36377d04bbc9..ccd8ac1f145023a7f9a5334a669b168b8fd78d97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-07-08  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub.d/10_hurd.in: Make kernel list progression not fail on
+       kernels whose paths contain regex metacharacters.
+       * util/grub.d/10_kfreebsd.in: Likewise.
+       * util/grub.d/10_linux.in: Likewise.
+       * util/grub.d/20_linux_xen.in: Likewise.
+
+       Reported by: Heimo Stranner.
+
 2014-06-26  Colin Watson  <cjwatson@ubuntu.com>
 
        * docs/grub-dev.texi (Finding your way around): The build system no
index 82dfe193f36ecf66d9f9defc78b75897e15e0a50..29b455423ceb9f3f09810f735ca2a50e8b9d45f1 100644 (file)
@@ -168,7 +168,7 @@ while [ "x$kernels" != "x" ] ; do
   hurd_entry "$kernel" advanced
   hurd_entry "$kernel" recovery
 
-  kernels=`echo $kernels | tr ' ' '\n' | grep -vx $kernel | tr '\n' ' '`
+  kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
index a524762fcdbe31c4ed99ad83aae5f144a5c7b5b3..ba7175bd712302738d148a4edf36cfa0d09c7e3f 100644 (file)
@@ -228,7 +228,7 @@ while [ "x$list" != "x" ] ; do
     kfreebsd_entry "${OS}" "${version}" recovery "-s"
   fi
 
-  list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
+  list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
index 00d193159e9e9d0bd7d674e023cc51d041f3ee15..d2e2a8fd37706f64ded528c7eaaca7f219d0fe91 100644 (file)
@@ -241,7 +241,7 @@ while [ "x$list" != "x" ] ; do
                 "single ${GRUB_CMDLINE_LINUX}"
   fi
 
-  list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+  list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to
index a60843500edc08d4f9ae5f8969d8202b46a28fef..2e777584cd7f0ce5fdfd2481a24045868bb5304d 100644 (file)
@@ -255,12 +255,12 @@ while [ "x${xen_list}" != "x" ] ; do
                "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
        fi
 
-       list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
+       list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
     done
     if [ x"$is_top_level" != xtrue ]; then
        echo '  }'
     fi
-    xen_list=`echo $xen_list | tr ' ' '\n' | grep -vx $current_xen | tr '\n' ' '`
+    xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
 done
 
 # If at least one kernel was found, then we need to