From: Daan De Meyer Date: Mon, 15 May 2023 13:55:32 +0000 (+0200) Subject: Pass firstboot settings to generated initrd as well X-Git-Tag: v15~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c18624a84ad7c401b2b5dc7ccefde85fb57185a;p=thirdparty%2Fmkosi.git Pass firstboot settings to generated initrd as well It generally doesn't make sense to have these differ between the initrd and the rootfs, so let's pass these settings through to the initrd as well. The only setting we don't pass through is the root shell as configuring a different root shell might mean installing extra packages which might be undesireable in the initrd. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index bf6da8328..d1eb25bdb 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -777,6 +777,14 @@ def install_unified_kernel(state: MkosiState, roothash: Optional[str]) -> None: "--make-initrd", "yes", "--bootable", "no", "--manifest-format", "", + *(["--locale", state.config.locale] if state.config.locale else []), + *(["--locale-messages", state.config.locale_messages] if state.config.locale_messages else []), + *(["--keymap", state.config.keymap] if state.config.keymap else []), + *(["--timezone", state.config.timezone] if state.config.timezone else []), + *(["--hostname", state.config.hostname] if state.config.hostname else []), + *(["--root-password", state.config.root_password] if state.config.root_password else []), + *(["--root-password-hashed", state.config.root_password_hashed] if state.config.root_password_hashed else []), + *(["--root-password-file", os.fspath(state.config.root_password_file)] if state.config.root_password_file else []), *(["-f"] * state.args.force), "build", ])