]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Only install bash in the initrd on gentoo
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Jul 2023 08:39:48 +0000 (10:39 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Jul 2023 08:52:30 +0000 (10:52 +0200)
I initially added this because no shell is pulled into the initrd
by default on gentoo when just installing systemd and util-linux.
Since this seems to override other distro's default shell, let's
limit this to just gentoo and rely on other distros pulling in a
shell via dependencies.

mkosi/__init__.py

index 415ec2a18205adc52b32453af5fef20ae7527c6f..ed90b2ebbbe9abd0798072f08f8099cf1ed8da3b 100644 (file)
@@ -854,9 +854,9 @@ def install_unified_kernel(state: MkosiState, roothash: Optional[str]) -> None:
                 "--package", "systemd",
                 "--package", "util-linux",
                 "--package", "kmod",
-                "--package", "bash",
                 *(["--package", "dmsetup"] if state.config.distribution.is_apt_distribution() else []),
                 *(["--package", "udev"] if not state.config.distribution.is_portage_distribution() else []),
+                *(["--package", "bash"] if state.config.distribution.is_portage_distribution() else []),
                 "--output", f"{state.config.output}-initrd",
                 *(["--image-version", state.config.image_version] if state.config.image_version else []),
                 "--make-initrd", "yes",