From: Maximilian Engelhardt Date: Sun, 24 Oct 2021 17:24:17 +0000 (+0200) Subject: debian: call update-grub when installing/removing xen-hypervisor-common X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~31 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=86b3fb0b986c96fbd27389b08ef6856e39ab71af;p=xen.git debian: call update-grub when installing/removing xen-hypervisor-common This fixes #988901 as now update-grub will be called by all packages that can affect the state of the update-grub generated output. Signed-off-by: Maximilian Engelhardt --- diff --git a/debian/xen-hypervisor-common.postinst b/debian/xen-hypervisor-common.postinst new file mode 100644 index 0000000000..1540842eec --- /dev/null +++ b/debian/xen-hypervisor-common.postinst @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +case "$1" in + configure) + if command -v update-grub > /dev/null && [ -d /boot/grub ]; then + update-grub || : + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/xen-hypervisor-common.postrm b/debian/xen-hypervisor-common.postrm new file mode 100644 index 0000000000..4833411ab6 --- /dev/null +++ b/debian/xen-hypervisor-common.postrm @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +case "$1" in + remove) + if command -v update-grub > /dev/null && [ -d /boot/grub ]; then + update-grub || : + fi + ;; + + purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0