From 0962aead95f6493049e7de09c64350ff2780d6a4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 9 Nov 2023 11:05:01 +0100 Subject: [PATCH] stages(kickstart): implement "text" option --- stages/org.osbuild.kickstart | 7 +++++++ stages/test/test_kickstart.py | 1 + 2 files changed, 8 insertions(+) diff --git a/stages/org.osbuild.kickstart b/stages/org.osbuild.kickstart index 82f949c173..15b59c4117 100755 --- a/stages/org.osbuild.kickstart +++ b/stages/org.osbuild.kickstart @@ -170,6 +170,10 @@ SCHEMA = r""" "type": "boolean" } } + }, + "text": { + "type": "boolean", + "description": "Perform the Kickstart installation in text mode" } } """ @@ -301,6 +305,9 @@ def main(tree, options): clearpart = make_clearpart(options) if clearpart: config += [clearpart] + text = options.get("text") + if text: + config += ["text"] target = os.path.join(tree, path) base = os.path.dirname(target) diff --git a/stages/test/test_kickstart.py b/stages/test/test_kickstart.py index 1bd64ace68..30dbb6cf71 100644 --- a/stages/test/test_kickstart.py +++ b/stages/test/test_kickstart.py @@ -88,6 +88,7 @@ }, "lang en_US.UTF-8\nkeyboard us\ntimezone UTC\nzerombr\nclearpart --all --drives=sd*|hd*|vda,/dev/vdc", ), + ({"text": True}, "text"), ]) def test_kickstart(tmp_path, test_input, expected): ks_stage_path = os.path.join(os.path.dirname(__file__), "../org.osbuild.kickstart")