From: Daan De Meyer Date: Wed, 19 Apr 2023 13:28:03 +0000 (+0200) Subject: Symlink /etc/initrd-release to /etc/os-release X-Git-Tag: v15~230^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62561c1cf0c7527ff7f8717b2f0dc32ead5ef282;p=thirdparty%2Fmkosi.git Symlink /etc/initrd-release to /etc/os-release This also does the trick and is simpler than renaming os-release. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 95ebeacba..ebd817a83 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1551,11 +1551,8 @@ def configure_initrd(state: MkosiState) -> None: if not state.root.joinpath("init").exists(): state.root.joinpath("init").symlink_to("/usr/lib/systemd/systemd") - if state.root.joinpath("etc/initrd-release").exists(): - return - - state.root.joinpath("etc/os-release").rename(state.root / "etc/initrd-release") - state.root.joinpath("etc/os-release").symlink_to("/etc/initrd-release") + if not state.root.joinpath("etc/initrd-release").exists(): + state.root.joinpath("etc/initrd-release").symlink_to("/etc/os-release") def run_kernel_install(state: MkosiState, cached: bool) -> None: