Tweak how we call grub-install; don't abort on error

Not ideal behaviour either, but don't break upgrades. Copy the
behaviour from the grub packages here. Closes: #990966
This commit is contained in:
Steve McIntyre 2021-07-12 09:51:50 +01:00
parent 6699b2ef0d
commit 39c311d677
2 changed files with 17 additions and 1 deletions

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
shim (15.4-7) unstable; urgency=high
* Tweak how we call grub-install; don't abort on error. Not ideal
behaviour either, but don't break upgrades. Copy the behaviour
from the grub packages here. Closes: #990966
-- Steve McIntyre <93sam@debian.org> Mon, 12 Jul 2021 08:53:54 +0100
shim (15.4-6) unstable; urgency=high
* Add arm64 patch to tweak section layout and stop crashing

View File

@ -46,6 +46,14 @@ config_item ()
eval echo "\$$1"
}
run_grub_install()
{
if ! grub-install $@ ; then
echo "Failed: grub-install $@" >&2
echo "WARNING: Bootloader is not properly installed, system may not be bootable" >&2
fi
}
case $1 in
configure)
bootloader_id="$(config_item GRUB_DISTRIBUTOR | tr A-Z a-z | \
@ -74,7 +82,7 @@ case $1 in
OPTIONS="$OPTIONS --no-nvram"
fi
grub-install --target=${GRUB_EFI_TARGET} $OPTIONS
run_grub_install --target=${GRUB_EFI_TARGET} $OPTIONS
fi
;;
esac