bootloader: Get the distribution name from the branding.

Remove the redundant "distribution" setting from bootloader.conf.
This commit is contained in:
Kevin Kofler 2014-11-16 04:26:51 +01:00
parent 98f99fa5bf
commit 3cf5baadc1
2 changed files with 10 additions and 7 deletions

View File

@ -1,7 +1,6 @@
--- ---
# Gummiboot configuration files settings, set preferred distribution name and amount of time before # Gummiboot configuration files settings, set kernel and initramfs file names
# default selection boots # and amount of time before default selection boots
distribution: KaOS-kf5
kernel: /vmlinuz-linux kernel: /vmlinuz-linux
img: /initramfs-linux.img img: /initramfs-linux.img
fallback: /initramfs-linux-fallback.img fallback: /initramfs-linux-fallback.img

View File

@ -53,7 +53,8 @@ def get_uuid():
def create_conf(uuid, conf_path): def create_conf(uuid, conf_path):
distribution = libcalamares.job.configuration["distribution"] branding = libcalamares.globalstorage.value("branding")
distribution = branding["productName"]
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")
@ -79,7 +80,8 @@ def create_conf(uuid, conf_path):
def create_fallback(uuid, fallback_path): def create_fallback(uuid, fallback_path):
distribution = libcalamares.job.configuration["distribution"] branding = libcalamares.globalstorage.value("branding")
distribution = branding["productName"]
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")
@ -105,7 +107,8 @@ def create_fallback(uuid, fallback_path):
def create_loader(loader_path): def create_loader(loader_path):
distribution = libcalamares.job.configuration["distribution"] branding = libcalamares.globalstorage.value("branding")
distribution = branding["productName"]
timeout = libcalamares.job.configuration["timeout"] timeout = libcalamares.job.configuration["timeout"]
lines = [ lines = [
'timeout %s\n' % timeout, 'timeout %s\n' % timeout,
@ -122,7 +125,8 @@ def install_bootloader(boot_loader, fw_type):
if fw_type == 'efi': if fw_type == 'efi':
install_path = libcalamares.globalstorage.value("rootMountPoint") install_path = libcalamares.globalstorage.value("rootMountPoint")
uuid = get_uuid() uuid = get_uuid()
distribution = libcalamares.job.configuration["distribution"] branding = libcalamares.globalstorage.value("branding")
distribution = branding["productName"]
conf_path = os.path.join( conf_path = os.path.join(
install_path, "boot", "loader", "entries", "%s.conf" % distribution) install_path, "boot", "loader", "entries", "%s.conf" % distribution)
fallback_path = os.path.join( fallback_path = os.path.join(