diff options
Diffstat (limited to 'sys-apps/kexec-tools/kexec-tools-9999.ebuild')
-rw-r--r-- | sys-apps/kexec-tools/kexec-tools-9999.ebuild | 18 |
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 } |