This makes 10_linux' test_gt() a bit more generic so that it can be
moved (along with a few other functions) to grub-mkconfig_lib, where
it'll be usable by 10_freebsd.

This will allow handling multiple kernel versions in 10_freebsd, like
10_linux does.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
2009-08-04  Robert Millan  <rmh.g...@aybabtu.com>

	* util/grub.d/10_linux.in (test_gt): Strip any basename prefix,
	not just "vmlinu[zx]".

Index: util/grub.d/10_linux.in
===================================================================
--- util/grub.d/10_linux.in	(revision 2466)
+++ util/grub.d/10_linux.in	(working copy)
@@ -67,8 +67,8 @@ test_numeric ()
 
 test_gt ()
 {
-  local a=`echo $1 | sed -e "s/vmlinu[zx]-//g"`
-  local b=`echo $2 | sed -e "s/vmlinu[zx]-//g"`
+  local a=`echo $1 | sed -e "s/[^-]*-//g"`
+  local b=`echo $2 | sed -e "s/[^-]*-//g"`
   local cmp=gt
   if [ "x$b" = "x" ] ; then
     return 0
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to