summaryrefslogtreecommitdiffstats
path: root/debian/dpkg.postrm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commite52abbeea0a0fd87f2df577263fdfcb89da6c1b0 (patch)
tree27a6f3ded04c521f55558166ee9322076339ca2b /debian/dpkg.postrm
parentAdding upstream version 1.21.22. (diff)
downloaddpkg-debian.tar.xz
dpkg-debian.zip
Adding debian version 1.21.22.debian/1.21.22debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/dpkg.postrm32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/dpkg.postrm b/debian/dpkg.postrm
new file mode 100755
index 0000000..4133419
--- /dev/null
+++ b/debian/dpkg.postrm
@@ -0,0 +1,32 @@
+#!/bin/sh
+# See deb-postrm(5).
+
+set -e
+
+# Remove log file when dpkg is purged
+remove_logfile() {
+ logdir=$DPKG_ROOT/var/log
+
+ rm -f "$logdir"/dpkg.log "$logdir"/dpkg.log.* 2>/dev/null
+ rm -f "$logdir"/alternatives.log "$logdir"/alternatives.log.* 2>/dev/null
+}
+
+case "$1" in
+remove)
+ ;;
+purge)
+ remove_logfile
+ ;;
+upgrade)
+ ;;
+failed-upgrade|disappear|abort-install|abort-upgrade)
+ ;;
+*)
+ echo "$0 called with unknown argument '$1'" 1>&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0