From e420341ba6b84810ff7aa540982d20fb71304dfe Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 16 Nov 2014 05:17:06 +0100 Subject: [PATCH] bootloader: Use shortProductName. This is particularly useful if the full product name contains "GNU/Linux" or "Linux", because e.g. "Generic GNU/Linux GNU/Linux" does not make sense. --- src/modules/bootloader/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index e27473ba3..efca4a1b8 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -54,7 +54,7 @@ def get_uuid(): def create_conf(uuid, conf_path): branding = libcalamares.globalstorage.value("branding") - distribution = branding["productName"] + distribution = branding["shortProductName"] kernel = libcalamares.job.configuration["kernel"] img = libcalamares.job.configuration["img"] partitions = libcalamares.globalstorage.value("partitions") @@ -81,7 +81,7 @@ def create_conf(uuid, conf_path): def create_fallback(uuid, fallback_path): branding = libcalamares.globalstorage.value("branding") - distribution = branding["productName"] + distribution = branding["shortProductName"] kernel = libcalamares.job.configuration["kernel"] fb_img = libcalamares.job.configuration["fallback"] partitions = libcalamares.globalstorage.value("partitions") @@ -108,7 +108,7 @@ def create_fallback(uuid, fallback_path): def create_loader(loader_path): branding = libcalamares.globalstorage.value("branding") - distribution = branding["productName"] + distribution = branding["shortProductName"] timeout = libcalamares.job.configuration["timeout"] file_name_sanitizer = str.maketrans(" /", "_-") lines = [ @@ -127,7 +127,7 @@ def install_bootloader(boot_loader, fw_type): install_path = libcalamares.globalstorage.value("rootMountPoint") uuid = get_uuid() branding = libcalamares.globalstorage.value("branding") - distribution = branding["productName"] + distribution = branding["shortProductName"] file_name_sanitizer = str.maketrans(" /", "_-") conf_path = os.path.join( install_path, "boot", "loader", "entries", "%s.conf" % distribution.translate(file_name_sanitizer))