grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix bad test on GRUB_DISABLE_SUBMENU.


From: Daniel Kiper
Subject: Re: [PATCH] Fix bad test on GRUB_DISABLE_SUBMENU.
Date: Wed, 18 Sep 2019 14:53:27 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Sep 17, 2019 at 05:52:10PM +0200, Javier Martinez Canillas wrote:
> From: Prarit Bhargava <address@hidden>
>
> The file /etc/grub.d/10_linux does
>
> if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
>
> when it should do
>
> if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; 
> then
>
> which results in submenus in /boot/grub2/grub.cfg when
> GRUB_DISABLE_SUBMENU="yes".
>
> Resolves: rhbz#1063414
>
> Signed-off-by: Prarit Bhargava <address@hidden>
> Signed-off-by: Javier Martinez Canillas <address@hidden>
> ---
>
>  util/grub.d/10_linux.in | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
> index 4532266be68..58defdbd83f 100644
> --- a/util/grub.d/10_linux.in
> +++ b/util/grub.d/10_linux.in
> @@ -261,7 +261,11 @@ while [ "x$list" != "x" ] ; do
>      fi
>    fi
>
> -  if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; 
> then
> +  if [ "x${GRUB_DISABLE_SUBMENU}" = "xyes" ] || [ "x${GRUB_DISABLE_SUBMENU}" 
> = "xy" ]; then
> +    GRUB_DISABLE_SUBMENU="true"
> +  fi
> +
> +  if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue 
> ]; then
>      linux_entry "${OS}" "${version}" simple \
>      "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"

Well, I understand the problem but I do not like the patch. Why do you
introduce "yes" and do not use "true"? Except GRUB_BUTTON_CMOS_ADDRESS,
which is wrong IMO, all variables accept only true/false. So, if you
want to add "yes" then do that for all. Otherwise you make only confusion.
And there are more files which has the same issue, e.g. util/grub.d/10_hurd.in

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]