summaryrefslogtreecommitdiffstats
path: root/debian/grub-pc.prerm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 10:54:18 +0000
commit8e67fbf68ffeb9eb5f026dd482d73b021660bf9b (patch)
treebb573facd5d02096f9956b2617a722b88acaa8af /debian/grub-pc.prerm
parentAdding upstream version 2.06. (diff)
downloadgrub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.tar.xz
grub2-8e67fbf68ffeb9eb5f026dd482d73b021660bf9b.zip
Adding debian version 2.06-3~deb11u6.debian/2.06-3_deb11u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/grub-pc.prerm')
-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