diff options
Diffstat (limited to 'user/grub/grub.post-upgrade')
-rw-r--r-- | user/grub/grub.post-upgrade | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/user/grub/grub.post-upgrade b/user/grub/grub.post-upgrade new file mode 100644 index 000000000..5b9cbb072 --- /dev/null +++ b/user/grub/grub.post-upgrade @@ -0,0 +1,38 @@ +#!/bin/sh -e +ver_new="$1" +ver_old="$2" + +if [ "$(apk version -t "$ver_old" "2.02-r8")" = "<" ]; then + cat >&2 <<-EOF + * + * Starting with grub=2.02-r8, /boot/grub/grub.cfg is now automatically + * regenerated when easy-kernel is upgraded. + * + EOF + if ! grep -Fqx '# DO NOT EDIT THIS FILE' /boot/grub/grub.cfg; then + cat >&2 <<-EOF + * It appears that you have a manual GRUB configuration. + * If this is incorrect, comment out ADELIE_MANUAL_CONFIG + * in /etc/default/grub. When this option is set, /boot/grub/grub.cfg + * will *not* be automatically regenerated. + * + EOF + + cat >> /etc/default/grub <<-EOF + # Uncomment the following line if you do *not* want /boot/grub/grub.cfg to be + # automatically regenerated when easy-kernel is upgraded. + ADELIE_MANUAL_CONFIG=1 + EOF + else + cat >&2 <<-EOF + * It appears that you have a default GRUB configuration. + * If this is incorrect, uncomment ADELIE_MANUAL_CONFIG=1 + * in /etc/default/grub. When this option is set, /boot/grub/grub.cfg + * will *not* be automatically regenerated. + * + * A copy of the existing configuration will be saved as + * /boot/grub/grub.cfg.update-grub-old. + * + EOF + fi +fi |