commit: 61c03ffab76740c0420e3c8a3185d047d461f7a7
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 5 01:54:10 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Aug 5 01:56:51 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c03ffa
sys-apps/kexec-tools: rev bump to force ewarn
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...ols-2.0.20-r2.ebuild => kexec-tools-2.0.20-r3.ebuild} | 16 ++++++++++++++++
sys-apps/kexec-tools/kexec-tools-9999.ebuild | 16 ++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/sys-apps/kexec-tools/kexec-tools-2.0.20-r2.ebuild
b/sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild
similarity index 80%
rename from sys-apps/kexec-tools/kexec-tools-2.0.20-r2.ebuild
rename to sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild
index 3a25aced9f0..4d758da9aad 100644
--- a/sys-apps/kexec-tools/kexec-tools-2.0.20-r2.ebuild
+++ b/sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild
@@ -107,4 +107,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
}
diff --git a/sys-apps/kexec-tools/kexec-tools-9999.ebuild
b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
index cb3f3b6f1c4..86b8d9fc978 100644
--- a/sys-apps/kexec-tools/kexec-tools-9999.ebuild
+++ b/sys-apps/kexec-tools/kexec-tools-9999.ebuild
@@ -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
}