Bug#481542: grub2: please user triggers
Felix Zielcke
fzielcke at z-51.de
Thu Jul 31 18:55:16 UTC 2008
retitle 481542 please use triggers for update-grub
thanks
I looked now at the man-db package which is a very easy implementation
for triggers.
I think it would be enough for us to do it like they did.
debian/triggers:
interest /boot
debian/*.postinst:
if [ "$1" = triggered ]; then
update-grub
fi
>IMHO it's important to consider how triggers would handle a situation
>such as an apt run that removed the running kernel added a new kernel,
>and then failed. In this case, the grub trigger might not run, which
>would leave a menu.lst that contained only a nonexistent kernel.
Well if removing the current installed kernel suceeded, but installing the new one failed,
then I think you don't have any kernel at all in /boot
Removing the current kernel should tell dpkg to run our trigger.
I don't think that if installing a new kernel fails, that the trigger doestn't get called,
as long as the whole install/update apt/dpkg process keeps running
But I try to reproduce this.
Luckly we currently have currently anyway a package in experimental.
More information about the Pkg-grub-devel
mailing list