From cca8eee7c6bbed164db0e35abfd3ee80dc44c905 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 23 Nov 2023 10:37:44 +0100 Subject: [PATCH] d/postrm: also move clean-up of links to new package Signed-off-by: Thomas Lamprecht --- debian/postrm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 debian/postrm diff --git a/debian/postrm b/debian/postrm new file mode 100755 index 0000000..09ff323 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,20 @@ +#! /bin/sh + +# Abort if any command returns an error value +set -e + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + # remove kernel symlinks + rm -f /boot/pve/vmlinuz || true + rm -f /boot/pve/initrd.img || true + rmdir --ignore-fail-on-non-empty /boot/pve/ || true + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER#