1 | #!/bin/sh |
---|
2 | # postrm script for debathena-reactivate |
---|
3 | # |
---|
4 | # see: dh_installdeb(1) |
---|
5 | |
---|
6 | set -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 | |
---|
21 | if 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 -- "$@" |
---|
24 | else |
---|
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 |
---|
42 | fi |
---|
43 | |
---|
44 | |
---|
45 | case "$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 | ;; |
---|
53 | esac |
---|
54 | |
---|
55 | # dh_installdeb will replace this with shell code automatically |
---|
56 | # generated by other debhelper scripts. |
---|
57 | |
---|
58 | #DEBHELPER# |
---|
59 | |
---|
60 | exit 0 |
---|