summaryrefslogtreecommitdiff
path: root/debian/trousers.prerm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/trousers.prerm')
-rw-r--r--debian/trousers.prerm45
1 files changed, 45 insertions, 0 deletions
diff --git a/debian/trousers.prerm b/debian/trousers.prerm
new file mode 100644
index 0000000..257e252
--- /dev/null
+++ b/debian/trousers.prerm
@@ -0,0 +1,45 @@
+#!/bin/sh
+# prerm script for trousers
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ if dpkg --compare-versions "$2" lt 0.3.8-3; then
+ # hack to avoid #676828
+ # removing the executable will make the init script exit gracefully
+ rm -f /usr/sbin/tcsd
+ # kill tcsd (and any other process owned by the tss user)
+ killall -u tss 2>/dev/null || true
+ fi
+ ;;
+
+ *)
+ 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