Follow-up Comment #3, bug #44454 (project grub):

Here are both "good" and "buggy" configs.

1. Buggy: the construction
if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  46464c03259a8cb0
        else
          search --no-floppy --fs-uuid --set=root 46464c03259a8cb0
        fi
is obviously not much use. Although grub DOES boot with it, I also somewhat
care about the readability of grub.cfg. Which can be seen in the attached
grub.cfg.good.

Secondly, there is no need to repeat the statement above after every line in
grub.cfg (as is seen in the grub.cfg.buggy).

2. In the file util/grub-mkconfig_lib.in (which is responsible for the output
above) the part:
echo "if [ x$feature_platform_search_hint = xy ]; then"
echo "  search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
echo "else"
echo "  search --no-floppy --fs-uuid --set=root ${fs_uuid}"
echo "fi"

can be replaced with:
echo "search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"

which produces the same result and the output is more readable.

But of course, I don't know everything and may be wrong. Therefore, I submit
this as a mere suggestion, as a result that works fine for me. Works both on
Linux and FreeBSD.


(file #33268, file #33269)
    _______________________________________________________

Additional Item Attachment:

File name: grub.cfg.buggy                 Size:6 KB
File name: grub.cfg.good                  Size:4 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44454>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to