/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos-client.postrm

  • Committer: Teddy Hogeborn
  • Date: 2017-08-20 16:20:54 UTC
  • Revision ID: teddy@recompile.se-20170820162054-jwig602syxx2k4l0
Alter copyright notices slightly.  Actual license is unchanged!

This alters all copyright notices to use the Free Software
Foundation's recommendations for license notices; from
<https://www.gnu.org/licenses/gpl-howto.html>:

  For programs that are more than one file, it is better to replace
  “this program” with the name of the program, and begin the statement
  with a line saying “This file is part of NAME”.

* DBUS-API: Use program name "Mandos" explicitly in license notice.
* debian/copyright: - '' -
* initramfs-unpack: - '' -
* legalnotice.xml: - '' -
* mandos: - '' -
* mandos-ctl: - '' -
* mandos-keygen: - '' -
* mandos-monitor: - '' -
* plugin-helpers/mandos-client-iprouteadddel.c: - '' -
* plugin-runner.c: - '' -
* plugins.d/askpass-fifo.c: - '' -
* plugins.d/mandos-client.c: - '' -
* plugins.d/password-prompt.c: - '' -
* plugins.d/plymouth.c: - '' -
* plugins.d/splashy.c: - '' -
* plugins.d/usplash.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
 
1
#!/bin/sh
2
2
# This script can be called in the following ways:
3
3
#
4
4
# After the package was removed:
26
26
# If preinst fails during upgrade:
27
27
#       <new-postrm> abort-upgrade <old-version>
28
28
 
 
29
set -e
29
30
 
30
 
# Update the initramfs
 
31
# Update the initial RAM file system image
31
32
update_initramfs()
32
33
{
33
 
        if which update-initramfs >/dev/null 2>&1; then
34
 
                update-initramfs -u
35
 
        fi
 
34
    update-initramfs -u -k all || :
36
35
}
37
36
 
38
 
 
39
37
case "$1" in
40
38
    remove)
41
39
        update_initramfs
42
40
        ;;
43
41
 
44
42
    purge)
45
 
        shred --remove /etc/keys/mandos/seckey.txt || :
 
43
        shred --remove /etc/keys/mandos/seckey.txt 2>/dev/null || :
46
44
        rm --force /etc/mandos/plugin-runner.conf \
47
45
            /etc/keys/mandos/pubkey.txt \
48
 
            /etc/keys/mandos/seckey.txt
49
 
        rmdir /etc/keys/mandos /etc/mandos/plugins.d /etc/mandos || :
 
46
            /etc/keys/mandos/seckey.txt \
 
47
            /etc/keys/mandos/dhparams.pem 2>/dev/null
 
48
        update_initramfs
50
49
        ;;
51
50
    upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
52
51
        ;;
53
52
 
54
53
    *)
55
 
        echo "$0 called with unknown argument \`$1'" 1>&2
 
54
        echo "$0 called with unknown argument '$1'" 1>&2
56
55
        exit 1
57
56
        ;;
58
57
esac