[dracut] Change image name terminology to match dracut
This commit is contained in:
parent
db20b79ac0
commit
596113c80f
@ -5,6 +5,6 @@
|
|||||||
---
|
---
|
||||||
# Dracut defaults to setting initramfs-<kernel-version>.img
|
# Dracut defaults to setting initramfs-<kernel-version>.img
|
||||||
# If you want to specify another filename for the resulting image,
|
# If you want to specify another filename for the resulting image,
|
||||||
# set a custom kernel name, including the path
|
# set a custom name, including the path
|
||||||
#
|
#
|
||||||
# kernelName: /boot/initramfs-linux.img
|
# initramfsName: /boot/initramfs-linux.img
|
||||||
|
@ -6,4 +6,4 @@ $id: https://calamares.io/schemas/dracut
|
|||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
kernelName: { type: string }
|
initramfsName: { type: string }
|
||||||
|
@ -34,12 +34,12 @@ def run_dracut():
|
|||||||
|
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
kernelName = libcalamares.job.configuration['kernelName']
|
initramfs_name = libcalamares.job.configuration['initramfsName']
|
||||||
|
|
||||||
if not kernelName:
|
if not initramfs_name:
|
||||||
return check_target_env_call(['dracut', '-f'])
|
return check_target_env_call(['dracut', '-f'])
|
||||||
else:
|
else:
|
||||||
return check_target_env_call(['dracut', '-f', '{}'.format(kernelName)])
|
return check_target_env_call(['dracut', '-f', initramfs_name])
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run():
|
||||||
@ -53,4 +53,4 @@ def run():
|
|||||||
|
|
||||||
if return_code != 0:
|
if return_code != 0:
|
||||||
return (_("Failed to run dracut on the target"),
|
return (_("Failed to run dracut on the target"),
|
||||||
_("The exit code was {}").format(return_code))
|
_(f"The exit code was {return_code}"))
|
||||||
|
Loading…
Reference in New Issue
Block a user