]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Apply all configuration after running the postinst script 1731/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 4 Aug 2023 11:28:26 +0000 (13:28 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 4 Aug 2023 11:39:37 +0000 (13:39 +0200)
Let's put all the functions writing dropins together and run them
after running the postinst script.

mkosi.md
mkosi/__init__.py

index ef2d17041e13d0ee3cacc60d0a7087c4621d410d..ca76145ea2b965690593cebe9b96e5416e39efea 100644 (file)
--- a/mkosi.md
+++ b/mkosi.md
@@ -1061,6 +1061,7 @@ Then, for each preset, we execute the following steps:
 * Copy the build script outputs into the image
 * Copy the extra trees into the image (`mkosi.extra`)
 * Run post-install script (`mkosi.postinst`)
+* Write config files required for `Ssh=`, `Autologin=` and `MakeInitrd=`
 * Install systemd-boot and configure secure boot if configured (`--secure-boot`)
 * Run `systemd-sysusers`
 * Run `systemctl preset-all`
index 813d4250983e0906a44f30f263edf69076e68a9e..84957ba858576da4df1cf39b60ab45e0f2bba44b 100644 (file)
@@ -1796,8 +1796,6 @@ def build_image(args: MkosiArgs, config: MkosiConfig) -> None:
                 save_cache(state)
                 reuse_cache(state)
 
-            configure_autologin(state)
-            configure_initrd(state)
             run_build_script(state)
 
             if state.config.output_format == OutputFormat.none:
@@ -1806,8 +1804,12 @@ def build_image(args: MkosiArgs, config: MkosiConfig) -> None:
 
             install_build_dest(state)
             install_extra_trees(state)
-            configure_ssh(state)
             run_postinst_script(state)
+
+            configure_autologin(state)
+            configure_initrd(state)
+            configure_ssh(state)
+
             install_boot_loader(state)
             run_sysusers(state)
             run_preset(state)