summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-09-26 10:56:43 -0400
committerMike Gilbert <floppym@gentoo.org>2022-09-26 10:58:44 -0400
commit3b3b5360aaa4a2dafc84037f492e73ff31814fd7 (patch)
tree0365ad8cdbe2f5615e3da6843e49366eea75f8be /sys-boot/grub/grub-9999.ebuild
parentdev-db/redis: drop 6.0.16 (diff)
downloadgentoo-3b3b5360aaa4a2dafc84037f492e73ff31814fd7.tar.gz
gentoo-3b3b5360aaa4a2dafc84037f492e73ff31814fd7.tar.bz2
gentoo-3b3b5360aaa4a2dafc84037f492e73ff31814fd7.zip
sys-boot/grub: add postinst warning to run grub-install
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'sys-boot/grub/grub-9999.ebuild')
-rw-r--r--sys-boot/grub/grub-9999.ebuild22
1 files changed, 16 insertions, 6 deletions
diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild
index 5aff4addbbee..407e54b6f361 100644
--- a/sys-boot/grub/grub-9999.ebuild
+++ b/sys-boot/grub/grub-9999.ebuild
@@ -297,18 +297,28 @@ pkg_postinst() {
elog "For information on how to configure GRUB2 please refer to the guide:"
elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
- if has_version 'sys-boot/grub:0'; then
- elog "A migration guide for GRUB Legacy users is available:"
- elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
- fi
-
- if [[ -z ${REPLACING_VERSIONS} ]]; then
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ local v
+ for v in ${REPLACING_VERSIONS}; do
+ if ver_test -gt ${v}; then
+ ewarn
+ ewarn "Re-run grub-install to update installed boot code!"
+ ewarn
+ break
+ fi
+ done
+ else
elog
optfeature "detecting other operating systems (grub-mkconfig)" sys-boot/os-prober
optfeature "creating rescue media (grub-mkrescue)" dev-libs/libisoburn
optfeature "enabling RAID device detection" sys-fs/mdadm
fi
+ if has_version 'sys-boot/grub:0'; then
+ elog "A migration guide for GRUB Legacy users is available:"
+ elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
+ fi
+
if has_version sys-boot/os-prober; then
ewarn "Due to security concerns, os-prober is disabled by default."
ewarn "Set GRUB_DISABLE_OS_PROBER=false in /etc/default/grub to enable it."