diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-05 03:54:10 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-05 03:56:51 +0200 |
commit | 61c03ffab76740c0420e3c8a3185d047d461f7a7 (patch) | |
tree | 58dcd0d697c4e514ae2f79068cf774aeeff0e4b2 /sys-apps | |
parent | dev-db/redis: arm64 stable (bug #633824) (diff) | |
download | gentoo-61c03ffab76740c0420e3c8a3185d047d461f7a7.tar.gz gentoo-61c03ffab76740c0420e3c8a3185d047d461f7a7.tar.bz2 gentoo-61c03ffab76740c0420e3c8a3185d047d461f7a7.zip |
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@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild (renamed from sys-apps/kexec-tools/kexec-tools-2.0.20-r2.ebuild) | 16 | ||||
-rw-r--r-- | sys-apps/kexec-tools/kexec-tools-9999.ebuild | 16 |
2 files changed, 32 insertions, 0 deletions
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 index 3a25aced9f07..4d758da9aadf 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 cb3f3b6f1c4a..86b8d9fc9789 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 } |