[dracut] add asked for schema.yaml

corrected if statement
This commit is contained in:
demmm 2022-09-03 14:36:45 +02:00
parent f16da0fde7
commit 26166e8f51
2 changed files with 12 additions and 3 deletions

View File

@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: 2022 Anke Boersma <demm@kaosx.us>
# SPDX-License-Identifier: GPL-3.0-or-later
---
$schema: https://json-schema.org/schema#
$id: https://calamares.io/schemas/dracut
additionalProperties: false
type: object
properties:
kernelName: { type: string }

View File

@ -36,10 +36,10 @@ def run_dracut():
""" """
kernelName = libcalamares.job.configuration['kernelName'] kernelName = libcalamares.job.configuration['kernelName']
if kernelName != 0: if not kernelName:
return check_target_env_call(['dracut', '-f', '{}'.format(kernelName)])
else:
return check_target_env_call(['dracut', '-f']) return check_target_env_call(['dracut', '-f'])
else:
return check_target_env_call(['dracut', '-f', '{}'.format(kernelName)])
def run(): def run():