#!/bin/sh # prerm script for trousers # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # * `deconfigure' `in-favour' # `removing' # # 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