Skip to content
Snippets Groups Projects
Commit f16da0fd authored by demmm's avatar demmm
Browse files

[dracut] add option to make the kernel name configurable

parent 7e737977
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: no
# SPDX-License-Identifier: CC0-1.0
#
# Run dracut(8) with an optional kernel name
---
# Dracut defaults to setting initramfs-<kernel-version>.img
# If you want to specify another filename for the resulting image,
# set a custom kernel name, including the path
#
# kernelName: /boot/initramfs-linux.img
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
# SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org> # SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
# SPDX-FileCopyrightText: 2017 Alf Gaida <agaid@siduction.org> # SPDX-FileCopyrightText: 2017 Alf Gaida <agaid@siduction.org>
# SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org> # SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
# SPDX-FileCopyrightText: 2022 Anke Boersma <demm@kaosx.us>
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# #
# Calamares is Free Software: see the License-Identifier above. # Calamares is Free Software: see the License-Identifier above.
# #
import libcalamares import libcalamares
from libcalamares.utils import target_env_call from libcalamares.utils import check_target_env_call
import gettext import gettext
...@@ -33,7 +34,12 @@ def run_dracut(): ...@@ -33,7 +34,12 @@ def run_dracut():
:return: :return:
""" """
return target_env_call(['dracut', '-f']) kernelName = libcalamares.job.configuration['kernelName']
if kernelName != 0:
return check_target_env_call(['dracut', '-f', '{}'.format(kernelName)])
else:
return check_target_env_call(['dracut', '-f'])
def run(): def run():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment