From: Daan De Meyer Date: Sat, 7 May 2022 18:56:59 +0000 (+0200) Subject: Always update /etc/kernel/cmdline X-Git-Tag: v13~42^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48b7ad4973878b2cd68844b99922fb5f8ffa92f7;p=thirdparty%2Fmkosi.git Always update /etc/kernel/cmdline Allows updating the kernel cmdline without needing a full rebuild. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index c3abea729..c24052095 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1714,6 +1714,9 @@ def prepare_tree(args: MkosiArgs, root: Path, do_run_build_script: bool, cached: if cached: # Reuse machine-id from cached image. args.machine_id = uuid.UUID(root.joinpath("etc/machine-id").read_text().strip()).hex + # Always update kernel command line. + if not do_run_build_script and args.bootable: + root.joinpath("etc/kernel/cmdline").write_text(" ".join(args.kernel_command_line) + "\n") return with complete_step("Setting up basic OS tree…"):