Hi
On Sun, 25 Nov 2018 12:40:08 -0500 Christopher wrote:
personally, I'd prefer we just run mkconfig after kernel updates.
I do the same, but automatically by adding a script:
/etc/kernel/postinst.d/setup-grub-cfg
that does:
------------------------------ cut here ------------------------------
#!/bin/bash -p
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Regenerates grub.cfg in posttrans of a kernel installation.
# Assumes that /etc/default/grub is already setup properly.
date=$(date '+%Y-%m-%d-%H-%M-%S')
grub2conf=$(readlink -f /etc/grub2-efi.cfg)
if ! [ -f "$grub2conf" ]; then
grub2conf=$(readlink -f /etc/grub2.cfg)
fi
cp -pf $grub2conf $grub2conf-$date
grub2-mkconfig -o $grub2conf || {
# grub2-mkconfig is safe: do not install if it fails.
echo '*** /sbin/grub2-mkconfig failed. Aborting'
exit 1
}
# Suppress the current saved_entry: potentially wrong since one
# rebuilds grub.cfg.
grub2-editenv - unset saved_entry
------------------------------ cut here ------------------------------
--
francis