From 86b3fb0b986c96fbd27389b08ef6856e39ab71af Mon Sep 17 00:00:00 2001 From: Maximilian Engelhardt Date: Sun, 24 Oct 2021 19:24:17 +0200 Subject: [PATCH] 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 --- debian/xen-hypervisor-common.postinst | 23 +++++++++++++++++++++++ debian/xen-hypervisor-common.postrm | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 debian/xen-hypervisor-common.postinst create mode 100644 debian/xen-hypervisor-common.postrm 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 -- 2.30.2