[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposed PATCH to allow control of the kernel ordering in grub.cfg
From: |
Mihai Moldovan |
Subject: |
Re: Proposed PATCH to allow control of the kernel ordering in grub.cfg |
Date: |
Fri, 21 Dec 2018 06:20:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
* 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