/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk
505.1.13 by Teddy Hogeborn
Miscellaneous fixes prompted by lintian:
1
#!/bin/sh
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
2
# This script can be called in the following ways:
3
#
4
# After the package was removed:
5
#       <postrm> remove
6
#
7
# After the package was purged:
8
#       <postrm> purge
9
#
10
# After the package was upgraded:
11
#       <old-postrm> upgrade <new-version>
12
# if that fails:
13
#       <new-postrm> failed-upgrade <old-version>
14
#
15
#
16
# After all of the packages files have been replaced:
17
#       <postrm> disappear <overwriting-package> <version>
18
#
19
#
20
# If preinst fails during install:
21
#       <new-postrm> abort-install
22
#
23
# If preinst fails during upgrade of removed package:
24
#       <new-postrm> abort-install <old-version>
25
#
26
# If preinst fails during upgrade:
27
#       <new-postrm> abort-upgrade <old-version>
28
505.1.13 by Teddy Hogeborn
Miscellaneous fixes prompted by lintian:
29
set -e
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
30
195 by Teddy Hogeborn
* debian/control (mandos, mandos-client): Depend on "adduser".
31
# Update the initial RAM file system image
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
32
update_initramfs()
33
{
771 by Teddy Hogeborn
Don't use absolute paths to commands in Debian configurations scripts.
34
    update-initramfs -u -k all || :
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
35
}
36
37
case "$1" in
38
    remove)
39
	update_initramfs
40
	;;
41
42
    purge)
197 by Teddy Hogeborn
* debian/control (mandos-client): Depend on "cryptsetup".
43
	shred --remove /etc/keys/mandos/seckey.txt 2>/dev/null || :
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
44
	rm --force /etc/mandos/plugin-runner.conf \
45
	    /etc/keys/mandos/pubkey.txt \
779 by Teddy Hogeborn
Debian bug fix for mandos-client: Remove dhparams.pem on purge.
46
	    /etc/keys/mandos/seckey.txt \
47
	    /etc/keys/mandos/dhparams.pem 2>/dev/null
464 by Teddy Hogeborn
* debian/mandos-client.postrm (purge): Bug fix: update initramfs also
48
	update_initramfs
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
49
	;;
50
    upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
51
	;;
52
53
    *)
275 by Teddy Hogeborn
* debian/mandos-client.postinst: Converted to Bourne shell. Also
54
	echo "$0 called with unknown argument '$1'" 1>&2
185 by Teddy Hogeborn
* .bzr-builddeb/default.conf: New.
55
	exit 1
56
	;;
57
esac
58
59
#DEBHELPER#
60
61
exit 0