/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.postinst

  • Committer: Teddy Hogeborn
  • Date: 2019-02-10 03:50:20 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 370.
  • Revision ID: teddy@recompile.se-20190210035020-nttr1tybgwwixueu
Show debconf note about new TLS key IDs

If mandos-client did not see TLS keys and had to create them, or if
mandos sees GnuTLS version 3.6.6 or later, show an important notice on
package installation about the importance of adding the new key_id
options to clients.conf on the Mandos server.

* debian/control (Package: mandos, Package: mandos-client): Depend on
                                                            debconf.
* debian/mandos-client.lintian-overrides: Override warnings.
* debian/mandos-client.postinst (create_keys): Show notice if new TLS
                                               key files were created.
* debian/mandos-client.templates: New.
* debian/mandos.lintian-overrides: Override warnings.
* debian/mandos.postinst (configure): If GnuTLS 3.6.6 or later is
                                      detected, show an important
                                      notice (once) about the new
                                      key_id option required in
                                      clients.conf.
* debian/mandos.templates: New.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# If prerm fails during replacement due to conflict:
16
16
#       <postinst> abort-remove in-favour <new-package> <version>
17
17
 
 
18
. /usr/share/debconf/confmodule
 
19
 
18
20
set -e
19
21
 
20
22
case "$1" in
53
55
            chown _mandos:_mandos /var/lib/mandos
54
56
            chmod u=rwx,go= /var/lib/mandos
55
57
        fi
 
58
 
 
59
        gnutls_version=$(dpkg-query --showformat='${Version}' \
 
60
                                    --show libgnutls30 \
 
61
                                    2>/dev/null || :)
 
62
        if [ -n "$gnutls_version" ] \
 
63
               && dpkg --compare-versions $gnutls_version ge 3.6.6; then
 
64
            db_version 2.0
 
65
            db_input critical mandos/key_id || true
 
66
            db_go
 
67
            db_stop
 
68
        fi
56
69
        ;;
57
70
    
58
71
    abort-upgrade|abort-deconfigure|abort-remove)