Where is /etc/default/grub in the Manjaro gitlab environment used for the ISO?

Where can I find /etc/default/grub in the Manjaro gitlab (github??) environment so I can verify something for myself? Any place I’ve seen the grub file it has double quotes. I’d like to see the Manjaro source where they are single quotes (see snippets below).

It isn’t a problem per se, but for example, anyone doing automation to configure grub may run into this change. It is also inconsistent with other string assignments. Last, it is an exercise to understand where to find the source.

Most current ISO - 24.2.1

GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT='quiet splash apparmor=1 security=apparmor udev.log_priority=3'
GRUB_CMDLINE_LINUX=""

Anything before ISO - 24.2.1

GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

For what is provided via the grub package (and what will be on installed systems) it is on the gitlab.

And it uses double quotes…

For the Live ISO its also on gitlab, but with the iso-profiles.

Where it shows no options but also uses double quotes. :thinking:

Maybe we might wonder which ISO exactly?

It is in Calamares, a module was rewritten, /usr/lib/calamares/modules/grubcfg. It is now using single quotes in /etc/default/grub for GRUB_DISTRIBUTOR and GRUB_CMDLINE_LINUX_DEFAULT.

It would be nice if all strings were double-quoted in /etc/default/grub for consistency.

Most current ISO - 24.2.1:

292     grub_config_items['GRUB_CMDLINE_LINUX_DEFAULT'] = f"'{' '.join(kernel_params)}'"
293     grub_config_items["GRUB_DISTRIBUTOR"] = f"'{distributor}'"

Anything before ISO - 24.2.1:

 243                 kernel_cmd = "GRUB_CMDLINE_LINUX_DEFAULT=\"{!s}\"".format(
 244                     " ".join(kernel_params)
 245                     )
1 Like

I think the developer writing the code has a preference of writing format strings with double qoutes

f" this is '{something}' "

which would require single quotes inside.

To use double qoutes inside one would switch the quotes

f' this is "{something}" '

or use escape

f" this is \"{something}\" "

Besides variable expansion there is no difference to use single or double qouting - they both serve the same purpose.

1 Like