summaryrefslogtreecommitdiff
path: root/eclass/dist-kernel-utils.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-21 01:17:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-21 01:17:50 +0100
commit7d4e34d0bcf06b357fd09a059a02687acf335132 (patch)
tree06974fa0252f3c0c3039ba3f9d4ce051ae11f3f6 /eclass/dist-kernel-utils.eclass
parent1941d371dc945a34f7070c341af1392edb5ca3a9 (diff)
gentoo auto-resync : 21:06:2023 - 01:17:50
Diffstat (limited to 'eclass/dist-kernel-utils.eclass')
-rw-r--r--eclass/dist-kernel-utils.eclass22
1 files changed, 16 insertions, 6 deletions
diff --git a/eclass/dist-kernel-utils.eclass b/eclass/dist-kernel-utils.eclass
index 439bdc87695d..cfb6f40ac6fa 100644
--- a/eclass/dist-kernel-utils.eclass
+++ b/eclass/dist-kernel-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 2020-2022 Gentoo Authors
+# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: dist-kernel-utils.eclass
@@ -104,12 +104,22 @@ dist-kernel_install_kernel() {
if [[ ${magic} == MZ ]]; then
einfo "Combined UEFI kernel+initramfs executable found"
# install the combined executable in place of kernel
- image=${initrd}.uefi
+ image=${initrd}.efi
mv "${initrd}" "${image}" || die
- # put an empty file in place of initrd. installing a duplicate
- # file would waste disk space, and removing it entirely provokes
- # kernel-install to regenerate it via dracut.
- > "${initrd}"
+ # We moved the generated initrd, prevent dracut from running again
+ # https://github.com/dracutdevs/dracut/pull/2405
+ shopt -s nullglob
+ local plugins=()
+ for file in "${EROOT}"/usr/lib/kernel/install.d/*.install; do
+ if ! has "${file##*/}" 50-dracut.install 51-dracut-rescue.install; then
+ plugins+=( "${file}" )
+ fi
+ done
+ for file in "${EROOT}"/etc/kernel/install.d/*.install; do
+ plugins+=( "${file}" )
+ done
+ shopt -u nullglob
+ export KERNEL_INSTALL_PLUGINS="${KERNEL_INSTALL_PLUGINS} ${plugins[@]}"
fi
ebegin "Installing the kernel via installkernel"