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 <maxi@daemonizer.de>
--- /dev/null
+#!/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
--- /dev/null
+#!/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