[grub] add workaround for openSUSE Live ISOs

* In their great wisdom, the openSUSE maintainers added a 'set linux=linux'
  line to their grub.cfg, which means that their kernel option token is no
  longer 'linux' but '$linux'... and we have to add a workaround for that.
This commit is contained in:
Pete Batard 2021-07-29 18:37:59 +01:00
parent 94a2789296
commit 723b6c98a2
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
4 changed files with 12 additions and 7 deletions

View file

@ -353,7 +353,11 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
if (props->is_grub_cfg) {
// Older versions of GRUB EFI used "linuxefi", newer just use "linux"
if ((replace_in_token_data(src, "linux", iso_label, usb_label, TRUE) != NULL) ||
(replace_in_token_data(src, "linuxefi", iso_label, usb_label, TRUE) != NULL)) {
(replace_in_token_data(src, "linuxefi", iso_label, usb_label, TRUE) != NULL) ||
// In their great wisdom, the openSUSE maintainers added a 'set linux=linux'
// line to their grub.cfg, which means that their kernel option token is no
// longer 'linux' but '$linux'... and we have to add a workaround for that.
(replace_in_token_data(src, "$linux", iso_label, usb_label, TRUE) != NULL)) {
uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label);
modified = TRUE;
}