From 81aca236be2d2cf84af0fb2f934f76462d0edfcd Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 2 Nov 2023 13:37:54 +0100 Subject: [PATCH] kickstart: add lang,keyboard,timezone to the supported options This commit adds support for the following kickstart options: - lang - keyboard - timezone --- stages/org.osbuild.kickstart | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/stages/org.osbuild.kickstart b/stages/org.osbuild.kickstart index 0ac046a350..a2605cbc91 100755 --- a/stages/org.osbuild.kickstart +++ b/stages/org.osbuild.kickstart @@ -119,6 +119,18 @@ SCHEMA = """ } } } + }, + "lang": { + "type": "string", + "description": "The language code (e.g. en_US.UTF-8)" + }, + "keyboard": { + "type": "string", + "description": "The keyboard map (e.g. us)" + }, + "timezone": { + "type": "string", + "description": "The timezone (e.g. UTC)" } } """ @@ -212,6 +224,16 @@ def main(tree, options): config += make_groups(options.get("groups", {})) config += make_users(options.get("users", {})) + lang = options.get("lang") + if lang: + config += [f"lang {lang}"] + keyboard = options.get("keyboard") + if keyboard: + config += [f"keyboard {lang}"] + tz = options.get("timezone") + if tz: + config += [f"timezone {tz}"] + target = os.path.join(tree, path) base = os.path.dirname(target) os.makedirs(base, exist_ok=True)