diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-10-22 22:07:26 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-10-22 22:07:26 +0100 |
commit | 7f7373679a508cefc3ec2752615eb60c29744620 (patch) | |
tree | 8bb06d2c70a7ab5a87e4425bcb992f036bf98163 | |
parent | a6098bbffed3a89d368f9ee777d3af17f088da22 (diff) |
auto update grub2 configuration
-rw-r--r-- | eclass/kogaion-kernel.eclass | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/eclass/kogaion-kernel.eclass b/eclass/kogaion-kernel.eclass index 00e33942..8266a895 100644 --- a/eclass/kogaion-kernel.eclass +++ b/eclass/kogaion-kernel.eclass @@ -833,6 +833,19 @@ _dracut_initramfs_create() { dracut -H -f -o systemd -o systemd-initrd -o systemd-networkd -o dracut-systemd --kver="${kver}" "${ROOT}boot/initramfs-genkernel-${kern_arch}-${kver}" } +_grub2_update_grubcfg() { + if [[ -x $(which grub2-mkconfig) ]]; then + elog "" + elog "Updating GRUB-2 bootloader configuration, please wait" + elog "" + $(which grub2-mkconfig) -o "${ROOT}boot/grub/grub.cfg" + else + elog "" + elog "It looks like you're not using GRUB-2, you must update bootloader configuration by hand" + elog "" + fi +} + kogaion-kernel_pkg_postinst() { if _is_kernel_binary; then # Update kernel initramfs to match user customizations @@ -847,6 +860,8 @@ kogaion-kernel_pkg_postinst() { _dracut_initramfs_create fi + _grub2_update_grubcfg + kernel-2_pkg_postinst local depmod_r=$(_get_release_level) _update_depmod "${depmod_r}" |