From 8ea29c271f38a80290a0981b8f51eb5d9f2d25a8 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Fri, 22 Nov 2024 19:46:32 -0600 Subject: [PATCH] [dracut] Ensure the user can remove -f but it stays as the default --- src/modules/dracut/main.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/modules/dracut/main.py b/src/modules/dracut/main.py index e98737387..9e2bc318f 100644 --- a/src/modules/dracut/main.py +++ b/src/modules/dracut/main.py @@ -36,21 +36,14 @@ def run_dracut(): :return: """ # Fetch the job configuration - cli_options = ["-f"] initramfs_name = libcalamares.job.configuration.get('initramfsName', None) - dracut_options = libcalamares.job.configuration.get('options', []) - - # Parse the custom options if there are any - for option in dracut_options: - # Deduplication check - if option not in cli_options: - cli_options.append(option) + dracut_options = libcalamares.job.configuration.get('options', ['-f']) if initramfs_name: - cli_options.append(initramfs_name) + dracut_options.append(initramfs_name) try: - target_env_process_output(['dracut'] + cli_options) + target_env_process_output(['dracut'] + dracut_options) except subprocess.CalledProcessError as cpe: libcalamares.utils.warning(f"Dracut failed with output: {cpe.output}") return cpe.returncode