* On 12/20/18 12:53 PM, Daniel Kiper wrote: >> diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in >> index 4532266be..f2dea11e9 100644 >> --- a/util/grub.d/10_linux.in >> +++ b/util/grub.d/10_linux.in >> @@ -193,7 +193,14 @@ submenu_indentation="" >> >> is_top_level=true >> while [ "x$list" != "x" ] ; do >> - linux=`version_find_latest $list` >> + linux="" >> + if [ "x${GRUB_PREFERRED_KERNEL}" != "x" ]; then >> + linux=`echo $list | tr ' ' '\n' | grep "${GRUB_PREFERRED_KERNEL}" | tr >> '\n' ' '` > > s/grep/egrep/?
Just a tiny nit: egrep/fgrep have been deprecated in POSIX/SUS. Initially, egrep, fgrep and grep were different programs (the rationale for that being that the original implementers didn't find a way to come up with a [space/time] efficient generic algorithm usable for all three variants), but subsequent grep standard specifications were written with the same functionality exposed via the -E and -F flags. Unless you really want to target ancient platforms, I'd try to go for grep -E/-F instead, even if typically egrep/fgrep will stay around as symlinks for quite a long time. Mihai
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel