summaryrefslogtreecommitdiff
path: root/debian/trousers.prerm
diff options
context:
space:
mode:
authorPierre Chifflier <pollux@debian.org>2012-07-05 20:56:13 +0200
committerIgor Pashev <pashev.igor@gmail.com>2012-11-25 14:36:22 +0000
commit0069ef22ba877f2a5dddfb8722757f5c3577b661 (patch)
tree58fc42bd7267686730ce267fcf71142255b9e9bc /debian/trousers.prerm
parentc3649a2def02c41d837ae1f79dda729ccb91e677 (diff)
downloadtrousers-debian/0.3.9-3.tar.gz
Imported Debian patch 0.3.9-3debian/0.3.9-3
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