forked from pool/fwupd
Marcus Meissner
c08240c54b
- Add fwupd-jscSLE-11766-close-efidir-leap-gap.patch: Set SLE and openSUSE esp os dir at runtime (jsc#SLE-11766) - Drop _multibuild and build option -Defi_os_dir="%{efidir}": with the above patch fwupd can detect esp os dir dynamically - Update the efidir related %post and %postun scripts in spec file OBS-URL: https://build.opensuse.org/request/show/831661 OBS-URL: https://build.opensuse.org/package/show/Base:System/fwupd?expand=0&rev=76
19 lines
812 B
Diff
19 lines
812 B
Diff
diff --git a/plugins/uefi/fu-uefi-common.c b/plugins/uefi/fu-uefi-common.c
|
|
index 6cd55672..6a710cdb 100644
|
|
--- a/plugins/uefi/fu-uefi-common.c
|
|
+++ b/plugins/uefi/fu-uefi-common.c
|
|
@@ -227,9 +227,13 @@ fu_uefi_get_esp_path_for_os (const gchar *base)
|
|
g_autofree gchar *esp_path = NULL;
|
|
g_autoptr(GError) error_local = NULL;
|
|
g_autoptr(GHashTable) os_release = fwupd_get_os_release (&error_local);
|
|
+ g_auto(GStrv) split = NULL;
|
|
/* try to lookup /etc/os-release ID key */
|
|
if (os_release != NULL) {
|
|
os_release_id = g_hash_table_lookup (os_release, "ID");
|
|
+ /* Overide os_release_id for SLE and openSUSE */
|
|
+ split = g_strsplit (g_hash_table_lookup (os_release, "NAME"), " ", 2);
|
|
+ os_release_id = g_ascii_strdown (split[0], -1);
|
|
} else {
|
|
g_debug ("failed to get ID: %s", error_local->message);
|
|
}
|