From: Daan De Meyer Date: Sun, 30 Apr 2023 14:38:36 +0000 (+0200) Subject: Always create /init symlink if systemd is installed X-Git-Tag: v15~188^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aaaca15dd2676db18772ad41628e5720f67ffb1;p=thirdparty%2Fmkosi.git Always create /init symlink if systemd is installed Let's always create the /init symlink if systemd is installed so that the kernel picks it up at /init when we try to use this output as the initramfs. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 086ebeef6..f32813e8f 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1281,12 +1281,12 @@ def configure_ssh(state: MkosiState) -> None: def configure_initrd(state: MkosiState) -> None: + if not state.root.joinpath("init").exists() and state.root.joinpath("usr/lib/systemd/systemd").exists(): + state.root.joinpath("init").symlink_to("/usr/lib/systemd/systemd") + if not state.config.make_initrd: return - if not state.root.joinpath("init").exists(): - state.root.joinpath("init").symlink_to("/usr/lib/systemd/systemd") - if not state.root.joinpath("etc/initrd-release").exists(): state.root.joinpath("etc/initrd-release").symlink_to("/etc/os-release")