update-initramfs: run_bootloader() invoke Initramfs hooks

Conform to policy
http://kernel-handbook.alioth.debian.org/ch-update-hooks.html#s-initramfs-hooks

We check that the dir exists to no longer invoke boot loader on our
own for squeeze, but work on partial upgrades from lenny.

The bootloader invocations can be removed postsqueeze.

Signed-off-by: maximilian attems <maks@debian.org>
This commit is contained in:
maximilian attems 2010-08-07 00:36:41 +02:00
parent a4e1a9ea73
commit 6f0b64634e

View File

@ -190,6 +190,14 @@ run_lilo()
# Invoke bootloader
run_bootloader()
{
# invoke policy conformant bootloader hooks
if [ -d /etc/initramfs/post-update.d/ ]; then
run-parts --arg=${version} --arg=${initramfs} \
/etc/initramfs/post-update.d/
return 0
fi
# FIXME: to be removed postsqueeze release
# if both lilo and grub around, figure out if lilo needs to be run
if ( command -v update-grub >/dev/null 2>&1 \
|| [ -e /boot/grub/menu.lst ] || [ -e /boot/grub/grub.cfg ] ) \