]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Copy systemd manager conf to initrd if set
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 16 Jul 2022 09:23:59 +0000 (11:23 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 18 Jul 2022 08:53:30 +0000 (10:53 +0200)
mkosi/__init__.py

index e8fbd873c23927a91ee1f836f1f29de72c2da401..d13a314530bbeb36e077866679383c2dfb4284dd 100644 (file)
@@ -1743,6 +1743,10 @@ def configure_dracut(args: MkosiArgs, packages: Set[str], root: Path) -> None:
     with dracut_dir.joinpath("30-mkosi-systemd-extras.conf").open("w") as f:
         for extra in DRACUT_SYSTEMD_EXTRAS:
             f.write(f'install_optional_items+=" {extra} "\n')
+        f.write('install_optional_items+=" /etc/systemd/system.conf "\n')
+        if root.joinpath("etc/systemd/system.conf.d").exists():
+            for conf in root.joinpath("etc/systemd/system.conf.d").iterdir():
+                f.write(f'install_optional_items+=" {Path("/") / conf.relative_to(root)} "\n')
 
     if args.hostonly_initrd:
         dracut_dir.joinpath("30-mkosi-filesystem.conf").write_text(