From fb3240046dcbfdec5d4ad78c531c4c11cfd18c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Mon, 16 Dec 2019 08:43:41 +0100 Subject: [PATCH] [initcpiocfg] update plymouth check --- src/modules/initcpiocfg/main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/initcpiocfg/main.py b/src/modules/initcpiocfg/main.py index a3a93801e..c096627f1 100644 --- a/src/modules/initcpiocfg/main.py +++ b/src/modules/initcpiocfg/main.py @@ -4,7 +4,7 @@ # === This file is part of Calamares - === # # Copyright 2014, Rohan Garg -# Copyright 2015 - 2018, Philip Müller +# Copyright 2015 - 2019, Philip Müller # Copyright 2017, Alf Gaida # Copyright 2019, Adriaan de Groot # @@ -100,6 +100,11 @@ def write_mkinitcpio_lines(hooks, modules, files, root_mount_point): with open(path, "w") as mkinitcpio_file: mkinitcpio_file.write("\n".join(mklins) + "\n") +def detect_plymouth(): + isPlymouth = target_env_call(["sh", "-c", "which plymouth"]) + debug("which plymouth exit code: {!s}".format(isPlymouth)) + + return isPlymouth def modify_mkinitcpio_conf(partitions, root_mount_point): """ @@ -121,8 +126,7 @@ def modify_mkinitcpio_conf(partitions, root_mount_point): unencrypted_separate_boot = False # It is important that the plymouth hook comes before any encrypt hook - plymouth_bin = os.path.join(root_mount_point, "usr/bin/plymouth") - if os.path.exists(plymouth_bin): + if detect_plymouth() == 0: hooks.append("plymouth") for partition in partitions: