branding: Add a dedicated bootloaderEntryName setting.
Use it in the bootloader and grubcfg modules instead of shortProductName.
This commit is contained in:
parent
91b711e0f7
commit
462819060b
@ -2,16 +2,17 @@
|
|||||||
componentName: default
|
componentName: default
|
||||||
|
|
||||||
strings:
|
strings:
|
||||||
productName: Generic GNU/Linux
|
productName: Generic GNU/Linux
|
||||||
shortProductName: Generic
|
shortProductName: Generic
|
||||||
version: 1.0 LTS
|
version: 1.0 LTS
|
||||||
shortVersion: 1.0
|
shortVersion: 1.0
|
||||||
versionedName: Generic GNU/Linux 1.0 LTS "Rusty Trombone"
|
versionedName: Generic GNU/Linux 1.0 LTS "Rusty Trombone"
|
||||||
shortVersionedName: Generic 1.0
|
shortVersionedName: Generic 1.0
|
||||||
|
bootloaderEntryName: Generic
|
||||||
|
|
||||||
images:
|
images:
|
||||||
productLogo: "squid.png"
|
productLogo: "squid.png"
|
||||||
productIcon: "squid.png"
|
productIcon: "squid.png"
|
||||||
|
|
||||||
slideshow:
|
slideshow:
|
||||||
- "squid.png"
|
- "squid.png"
|
||||||
|
@ -51,7 +51,8 @@ QStringList Branding::s_stringEntryStrings =
|
|||||||
"shortVersion",
|
"shortVersion",
|
||||||
"versionedName",
|
"versionedName",
|
||||||
"shortVersionedName",
|
"shortVersionedName",
|
||||||
"shortProductName"
|
"shortProductName",
|
||||||
|
"bootloaderEntryName"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ public:
|
|||||||
ShortVersion,
|
ShortVersion,
|
||||||
VersionedName,
|
VersionedName,
|
||||||
ShortVersionedName,
|
ShortVersionedName,
|
||||||
ShortProductName
|
ShortProductName,
|
||||||
|
BootloaderEntryName
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ImageEntry : short
|
enum ImageEntry : short
|
||||||
|
@ -54,7 +54,7 @@ def get_uuid():
|
|||||||
|
|
||||||
def create_conf(uuid, conf_path):
|
def create_conf(uuid, conf_path):
|
||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
distribution = branding["shortProductName"]
|
distribution = branding["bootloaderEntryName"]
|
||||||
kernel = libcalamares.job.configuration["kernel"]
|
kernel = libcalamares.job.configuration["kernel"]
|
||||||
img = libcalamares.job.configuration["img"]
|
img = libcalamares.job.configuration["img"]
|
||||||
partitions = libcalamares.globalstorage.value("partitions")
|
partitions = libcalamares.globalstorage.value("partitions")
|
||||||
@ -81,7 +81,7 @@ def create_conf(uuid, conf_path):
|
|||||||
|
|
||||||
def create_fallback(uuid, fallback_path):
|
def create_fallback(uuid, fallback_path):
|
||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
distribution = branding["shortProductName"]
|
distribution = branding["bootloaderEntryName"]
|
||||||
kernel = libcalamares.job.configuration["kernel"]
|
kernel = libcalamares.job.configuration["kernel"]
|
||||||
fb_img = libcalamares.job.configuration["fallback"]
|
fb_img = libcalamares.job.configuration["fallback"]
|
||||||
partitions = libcalamares.globalstorage.value("partitions")
|
partitions = libcalamares.globalstorage.value("partitions")
|
||||||
@ -108,7 +108,7 @@ def create_fallback(uuid, fallback_path):
|
|||||||
|
|
||||||
def create_loader(loader_path):
|
def create_loader(loader_path):
|
||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
distribution = branding["shortProductName"]
|
distribution = branding["bootloaderEntryName"]
|
||||||
timeout = libcalamares.job.configuration["timeout"]
|
timeout = libcalamares.job.configuration["timeout"]
|
||||||
file_name_sanitizer = str.maketrans(" /", "_-")
|
file_name_sanitizer = str.maketrans(" /", "_-")
|
||||||
lines = [
|
lines = [
|
||||||
@ -127,7 +127,7 @@ def install_bootloader(boot_loader, fw_type):
|
|||||||
install_path = libcalamares.globalstorage.value("rootMountPoint")
|
install_path = libcalamares.globalstorage.value("rootMountPoint")
|
||||||
uuid = get_uuid()
|
uuid = get_uuid()
|
||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
distribution = branding["shortProductName"]
|
distribution = branding["bootloaderEntryName"]
|
||||||
file_name_sanitizer = str.maketrans(" /", "_-")
|
file_name_sanitizer = str.maketrans(" /", "_-")
|
||||||
conf_path = os.path.join(
|
conf_path = os.path.join(
|
||||||
install_path, "boot", "loader", "entries", "%s.conf" % distribution.translate(file_name_sanitizer))
|
install_path, "boot", "loader", "entries", "%s.conf" % distribution.translate(file_name_sanitizer))
|
||||||
|
@ -67,5 +67,5 @@ def run():
|
|||||||
partitions = libcalamares.globalstorage.value("partitions")
|
partitions = libcalamares.globalstorage.value("partitions")
|
||||||
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
root_mount_point = libcalamares.globalstorage.value("rootMountPoint")
|
||||||
branding = libcalamares.globalstorage.value("branding")
|
branding = libcalamares.globalstorage.value("branding")
|
||||||
distributor = branding["shortProductName"]
|
distributor = branding["bootloaderEntryName"]
|
||||||
return modify_grub_default(partitions, root_mount_point, distributor)
|
return modify_grub_default(partitions, root_mount_point, distributor)
|
||||||
|
Loading…
Reference in New Issue
Block a user