26
26
# If preinst fails during upgrade:
27
27
# <new-postrm> abort-upgrade <old-version>
30
# Update the initramfs
31
# Update the initial RAM file system image
33
if which update-initramfs >/dev/null 2>&1; then
34
if command -v update-initramfs >/dev/null; then
35
update-initramfs -k all -u 1>&2
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" 1>&2
45
shred --remove /etc/keys/mandos/seckey.txt || :
53
shred --remove /etc/keys/mandos/seckey.txt \
54
/etc/keys/mandos/tls-privkey.pem 2>/dev/null || :
46
55
rm --force /etc/mandos/plugin-runner.conf \
47
56
/etc/keys/mandos/pubkey.txt \
48
/etc/keys/mandos/seckey.txt
49
rmdir /etc/keys/mandos /etc/mandos/plugins.d /etc/mandos || :
57
/etc/keys/mandos/seckey.txt \
58
/etc/keys/mandos/tls-privkey.pem \
59
/etc/keys/mandos/tls-pubkey.pem \
60
/etc/keys/mandos/dhparams.pem 2>/dev/null
51
63
upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
55
echo "$0 called with unknown argument \`$1'" 1>&2
67
echo "$0 called with unknown argument '$1'" 1>&2