source: trunk/debathena/config/reactivate/debian/debathena-reactivate.postrm @ 25727

Revision 25727, 1.7 KB checked in by jdreed, 12 years ago (diff)
In reactivate: * Cleanup from r24057, where we had to special-case quickstations via su-error and sudo-error, and cleanup those conffiles in a Debian-esque way * Add a trailing NUL to the end of sudo-warning to workaround a bug in sudo 1.8.3p1 (fixed upstream, but not in Precise)
Line 
1#!/bin/sh
2# postrm script for debathena-reactivate
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9#        * <postrm> `remove'
10#        * <postrm> `purge'
11#        * <old-postrm> `upgrade' <new-version>
12#        * <new-postrm> `failed-upgrade' <old-version>
13#        * <new-postrm> `abort-install'
14#        * <new-postrm> `abort-install' <old-version>
15#        * <new-postrm> `abort-upgrade' <old-version>
16#        * <disappearer's-postrm> `disappear' <overwriter>
17#          <overwriter-version>
18# for details, see http://www.debian.org/doc/debian-policy/ or
19# the debian-policy package
20
21if dpkg-maintscript-helper supports rm_conffile 2> /dev/null; then
22    dpkg-maintscript-helper rm_conffile /etc/athena/sudo-error 2.0.39 -- "$@"
23    dpkg-maintscript-helper rm_conffile /etc/athena/su-error 2.0.39 -- "$@"
24else
25    # From http://wiki.debian.org/DpkgConffileHandling
26    rm_conffile() {
27        local PKGNAME="$1" # Unused
28        local CONFFILE="$2"
29       
30        if [ -f "$CONFFILE".dpkg-del ]; then
31            mv -f "$CONFFILE".dpkg-del "$CONFFILE"
32        fi
33    }
34    # See policy 6.6, item 3 and 5
35    case "$1" in
36        abort-install|abort-upgrade)
37            if dpkg --compare-versions "$2" le-nl 2.0.39; then
38                rm_conffile debathena-reactivate "/etc/athena/sudo-error"
39                rm_conffile debathena-reactivate "/etc/athena/su-error"
40            fi
41    esac
42fi
43
44
45case "$1" in
46    purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
47    ;;
48
49    *)
50        echo "postrm called with unknown argument \`$1'" >&2
51        exit 1
52    ;;
53esac
54
55# dh_installdeb will replace this with shell code automatically
56# generated by other debhelper scripts.
57
58#DEBHELPER#
59
60exit 0
Note: See TracBrowser for help on using the repository browser.