2
# This script can be called in the following ways:
4
# After the package was removed:
7
# After the package was purged:
10
# After the package was upgraded:
11
# <old-postrm> upgrade <new-version>
13
# <new-postrm> failed-upgrade <old-version>
16
# After all of the packages files have been replaced:
17
# <postrm> disappear <overwriting-package> <version>
20
# If preinst fails during install:
21
# <new-postrm> abort-install
23
# If preinst fails during upgrade of removed package:
24
# <new-postrm> abort-install <old-version>
26
# If preinst fails during upgrade:
27
# <new-postrm> abort-upgrade <old-version>
31
# Update the initial RAM file system image
34
if command -v update-initramfs >/dev/null; then
35
update-initramfs -k all -u
36
elif command -v dracut >/dev/null; then
37
# Logic taken from dracut.postinst
38
for kernel in /boot/vmlinu[xz]-*; do
39
kversion="${kernel#/boot/vmlinu[xz]-}"
40
if [ "$kversion" != "*" ]; then
41
/etc/kernel/postinst.d/dracut "$kversion"
53
shred --remove /etc/keys/mandos/seckey.txt 2>/dev/null || :
54
rm --force /etc/mandos/plugin-runner.conf \
55
/etc/keys/mandos/pubkey.txt \
56
/etc/keys/mandos/seckey.txt \
57
/etc/keys/mandos/tls-privkey.pem \
58
/etc/keys/mandos/tls-pubkey.pem \
59
/etc/keys/mandos/dhparams.pem 2>/dev/null
62
upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
66
echo "$0 called with unknown argument '$1'" 1>&2