From 8a2c5c1727f0dff1dea525528ce47d825d776a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Wed, 26 Sep 2018 21:52:41 +0200 Subject: [PATCH] [initcpiocfg] fix syntax --- src/modules/grubcfg/main.py | 6 +++--- src/modules/initcpiocfg/main.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/grubcfg/main.py b/src/modules/grubcfg/main.py index 90379a17f..1dd9a7f0a 100644 --- a/src/modules/grubcfg/main.py +++ b/src/modules/grubcfg/main.py @@ -103,14 +103,14 @@ def modify_grub_default(partitions, root_mount_point, distributor): kernel_params = ["quiet"] - if exists(join(self.root, "usr/bin/grub-set-bootflag")): + if os.path.exists(join(self.root, "usr/bin/grub-set-bootflag")): kernel_params.append = ["loglevel=3", "vga=current", "rd.systemd.show_status=auto", "rd.udev.log-priority=3", "vt.global_cursor_default=0"] if cryptdevice_params: kernel_params.extend(cryptdevice_params) - if use_splash and not exists(join(self.root, "usr/bin/grub-set-bootflag")): + if use_splash and not os.path.exists(join(self.root, "usr/bin/grub-set-bootflag")): kernel_params.append(use_splash) if swap_uuid: @@ -161,7 +161,7 @@ def modify_grub_default(partitions, root_mount_point, distributor): existing_param_name = existing_param.split("=")[0] # the only ones we ever add - if not exists(join(self.root, "usr/bin/grub-set-bootflag")) + if not os.path.exists(join(self.root, "usr/bin/grub-set-bootflag")) and existing_param_name not in ["quiet", "resume", "splash"]: kernel_params.append(existing_param) diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index bcd2bccaf..f5d6f3567 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -156,7 +156,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): elif (btrfs == "yes" and cpu['proc0']['vendor_id'].lower() == "genuineintel"): modules.append("crc32c-intel") - elif not exists(join(self.root, "usr/bin/grub-set-bootflag")): + elif not os.path.exists(join(self.root, "usr/bin/grub-set-bootflag")): hooks.append("fsck") write_mkinitcpio_lines(hooks, modules, files, root_mount_point)