summaryrefslogtreecommitdiff
path: root/sys-apps/kexec-tools/kexec-tools-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-08-25 10:45:55 +0100
commit3cf7c3ef441822c889356fd1812ebf2944a59851 (patch)
treec513fe68548b40365c1c2ebfe35c58ad431cdd77 /sys-apps/kexec-tools/kexec-tools-9999.ebuild
parent05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff)
gentoo resync : 25.08.2020
Diffstat (limited to 'sys-apps/kexec-tools/kexec-tools-9999.ebuild')
-rw-r--r--sys-apps/kexec-tools/kexec-tools-9999.ebuild18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
index 77c5d7c6e590..86b8d9fc9789 100644
--- a/sys-apps/kexec-tools/kexec-tools-9999.ebuild
+++ b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
@@ -87,7 +87,7 @@ src_install() {
dodoc "${FILESDIR}"/README.Gentoo
- newinitd "${FILESDIR}"/kexec.init-2.0.13-r1 kexec
+ newinitd "${FILESDIR}"/kexec-r2.init kexec
newconfd "${FILESDIR}"/kexec.conf-2.0.4 kexec
insinto /etc
@@ -105,4 +105,20 @@ pkg_postinst() {
elog " /etc/kexec.conf"
elog "Please adopt it to your needs as there is no autoconfig anymore"
fi
+
+ local n_root_args=$(grep -o -- '\<root=' /proc/cmdline 2>/dev/null | wc -l)
+ local has_rootpart_set=no
+ if [[ -f "${EROOT}/etc/conf.d/kexec" ]]; then
+ if grep -q -E -- '^ROOTPART=' "${EROOT}/etc/conf.d/kexec" 2>/dev/null; then
+ has_rootpart_set=yes
+ fi
+ fi
+
+ if [[ ${n_root_args} > 1 && "${has_rootpart_set}" == "no" ]]; then
+ ewarn "WARNING: Multiple root arguments (root=) on kernel command-line detected!"
+ ewarn "This was probably caused by a previous version of ${PN}."
+ ewarn "Please reboot system once *without* kexec to avoid boot problems"
+ ewarn "in case running system and initramfs do not agree on detected"
+ ewarn "root device name!"
+ fi
}