From d2d2b56b020183c326cc9bc9af8f8983cff97502 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Tue, 23 Oct 2018 19:03:31 +0200 Subject: [PATCH] [grubcfg] adopt development changes --- src/modules/grubcfg/main.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index d3f292281..df578bc67 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -3,7 +3,7 @@ # # === This file is part of Calamares - === # -# Copyright 2014-2015, Philip Müller +# Copyright 2014-2018, Philip Müller # Copyright 2015-2017, Teo Mrnjavac # Copyright 2017, Alf Gaida # Copyright 2017, Adriaan de Groot @@ -103,10 +103,15 @@ def modify_grub_default(partitions, root_mount_point, distributor): kernel_params = ["quiet"] + if os.path.exists(os.path.join(root_mount_point, "usr/bin/grub-set-bootflag")): + grub_params = ["loglevel=3", "vga=current", "rd.systemd.show_status=auto", + "rd.udev.log-priority=3", "vt.global_cursor_default=0"] + kernel_params.extend(grub_params) + if cryptdevice_params: kernel_params.extend(cryptdevice_params) - if use_splash: + if use_splash and not os.path.exists(os.path.join(root_mount_point, "usr/bin/grub-set-bootflag")): kernel_params.append(use_splash) if swap_uuid: @@ -153,13 +158,13 @@ def modify_grub_default(partitions, root_mount_point, distributor): line = line.rstrip("'") existing_params = line.split() - for existing_param in existing_params: - existing_param_name = existing_param.split("=")[0] + if not os.path.exists(os.path.join(root_mount_point, "usr/bin/grub-set-bootflag")): + for existing_param in existing_params: + existing_param_name = existing_param.split("=")[0] - # the only ones we ever add - if existing_param_name not in [ - "quiet", "resume", "splash"]: - kernel_params.append(existing_param) + # the only ones we ever add + if existing_param_name not in ["quiet", "resume", "splash"]: + kernel_params.append(existing_param) kernel_cmd = "GRUB_CMDLINE_LINUX_DEFAULT=\"{!s}\"".format( " ".join(kernel_params)