From: Daan De Meyer Date: Fri, 4 Aug 2023 11:28:26 +0000 (+0200) Subject: Apply all configuration after running the postinst script X-Git-Tag: v15~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1731%2Fhead;p=thirdparty%2Fmkosi.git Apply all configuration after running the postinst script Let's put all the functions writing dropins together and run them after running the postinst script. --- diff --git a/mkosi.md b/mkosi.md index ef2d17041..ca76145ea 100644 --- 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` diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 813d42509..84957ba85 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -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)