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

  • Committer: Teddy Hogeborn
  • Date: 2016-06-21 19:49:01 UTC
  • mto: This revision was merged to the branch mainline in revision 855.
  • Revision ID: teddy@recompile.se-20160621194901-sd4jpyv08sxghdwi
Tags: version-1.7.8-1
* Makefile (version): Change to 1.7.8.
* NEWS (Version 1.7.8): Add new entry.
* debian/changelog (1.7.8-1): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# Update the initial RAM file system image
21
21
update_initramfs()
22
22
{
23
 
    if [ -x /usr/sbin/update-initramfs ]; then
24
 
        update-initramfs -u -k all
25
 
    fi
 
23
    update-initramfs -u -k all
26
24
    
27
25
    if dpkg --compare-versions "$2" lt-nl "1.0.10-1"; then
28
26
        # Make old initrd.img files unreadable too, in case they were
58
56
        -a -r /etc/keys/mandos/seckey.txt ]; then
59
57
        return 0
60
58
    fi
61
 
    if [ -x /usr/sbin/mandos-keygen ]; then
62
 
        mandos-keygen
63
 
    fi
 
59
    mandos-keygen
64
60
}
65
61
 
66
62
create_dh_params(){
67
 
    if [ -r /etc/keys/mandos/client-dhparams.pem ]; then
 
63
    if [ -r /etc/keys/mandos/dhparams.pem ]; then
68
64
        return 0
69
65
    fi
70
66
    # Create a Diffe-Hellman parameters file
84
80
        "$DHFILE"
85
81
    sed --in-place --expression='1i-----BEGIN DH PARAMETERS-----' \
86
82
            "$DHFILE"
87
 
    cp --archive "$DHFILE" /etc/keys/mandos/client-dhparams.pem
 
83
    cp --archive "$DHFILE" /etc/keys/mandos/dhparams.pem
88
84
    rm -- "$DHFILE"
89
85
}
90
86
 
94
90
        create_key "$@"
95
91
        create_dh_params "$@" || :
96
92
        update_initramfs "$@"
 
93
        if dpkg --compare-versions "$2" lt-nl "1.7.7-1"; then
 
94
            PLUGINHELPERDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)/mandos/plugin-helpers
 
95
            if ! dpkg-statoverride --list "$PLUGINHELPERDIR" \
 
96
                 >/dev/null 2>&1; then
 
97
                chmod u=rwx,go= -- "$PLUGINHELPERDIR"
 
98
            fi
 
99
            if ! dpkg-statoverride --list /etc/mandos/plugin-helpers \
 
100
                 >/dev/null 2>&1; then
 
101
                chmod u=rwx,go= -- /etc/mandos/plugin-helpers
 
102
            fi
 
103
        fi
97
104
        ;;
98
105
    abort-upgrade|abort-deconfigure|abort-remove)
99
106
        ;;