[dracut] add asked for schema.yaml
corrected if statement
This commit is contained in:
parent
f16da0fde7
commit
26166e8f51
9
src/modules/dracut/dracut.schema.yaml
Normal file
9
src/modules/dracut/dracut.schema.yaml
Normal 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 }
|
@ -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():
|
||||||
|
Loading…
Reference in New Issue
Block a user