/mandos/release

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

« back to all changes in this revision

Viewing changes to debian/mandos-client.postrm

  • Committer: Teddy Hogeborn
  • Date: 2019-07-29 16:35:53 UTC
  • mto: This revision was merged to the branch mainline in revision 384.
  • Revision ID: teddy@recompile.se-20190729163553-1i442i2cbx64c537
Make tests and man page examples match

Make the tests test_manual_page_example[1-5] match exactly what is
written in the manual page, and add comments to manual page as
reminders to keep tests and manual page examples in sync.

* mandos-ctl (Test_commands_from_options.test_manual_page_example_1):
  Remove "--verbose" option, since the manual does not have it as the
  first example, and change assertion to match.
* mandos-ctl.xml (EXAMPLE): Add comments to all examples documenting
  which test function they correspond to.  Also remove unnecessary
  quotes from option arguments in fourth example, and clarify language
  slightly in fifth example.

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/tls-privkey.pem \
 
48
            /etc/keys/mandos/tls-pubkey.pem \
 
49
            /etc/keys/mandos/dhparams.pem 2>/dev/null
 
50
        update_initramfs
50
51
        ;;
51
52
    upgrade|failed-upgrade|disappear|abort-install|abort-upgrade)
52
53
        ;;
53
54
 
54
55
    *)
55
 
        echo "$0 called with unknown argument \`$1'" 1>&2
 
56
        echo "$0 called with unknown argument '$1'" 1>&2
56
57
        exit 1
57
58
        ;;
58
59
esac