summaryrefslogtreecommitdiffstats
path: root/debian/grub-pc.prerm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:29:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:29:52 +0000
commitca67b09c015d4af3ae3cce12aa72e60941dbb8b5 (patch)
treeb7316d7b06c373e08dabb79a2c866c568e08f49e /debian/grub-pc.prerm
parentAdding upstream version 2.06. (diff)
downloadgrub2-ca67b09c015d4af3ae3cce12aa72e60941dbb8b5.tar.xz
grub2-ca67b09c015d4af3ae3cce12aa72e60941dbb8b5.zip
Adding debian version 2.06-13+deb12u1.debian/2.06-13+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/grub-pc.prerm28
1 files changed, 28 insertions, 0 deletions
diff --git a/debian/grub-pc.prerm b/debian/grub-pc.prerm
new file mode 100644
index 0000000..13bbc60
--- /dev/null
+++ b/debian/grub-pc.prerm
@@ -0,0 +1,28 @@
+#!/bin/bash
+set -e
+
+case "$1" in
+ remove|deconfigure)
+ . /usr/share/debconf/confmodule
+ db_get grub-pc/chainload_from_menu.lst
+ if $RET && test -e /boot/grub/menu.lst ; then
+ echo "Saving menu.lst backup in /boot/grub/menu.lst_backup_by_grub2_prerm" >&2
+ cp /boot/grub/menu.lst{,_backup_by_grub2_prerm}
+ echo "Running update-grub Legacy to remove our core.img in it" >&2
+ /usr/lib/grub-legacy/update-grub 2>&1 | sed -e "s/^/ /g" >&2
+ fi
+ ;;
+ failed-upgrade|upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0