/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: 2018-02-10 13:23:58 UTC
  • Revision ID: teddy@recompile.se-20180210132358-8pfvo9vshq9l32y5
Remove unnecessary text left from old example init.d file

* init.d-mandos: Remove unnecessary text left from old example init.d
  file.

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
 
60
    gpg-connect-agent KILLAGENT /bye || :
64
61
}
65
62
 
66
63
create_dh_params(){
67
 
    if [ -r /etc/keys/mandos/client-dhparams.pem ]; then
 
64
    if [ -r /etc/keys/mandos/dhparams.pem ]; then
68
65
        return 0
69
66
    fi
70
67
    # Create a Diffe-Hellman parameters file
84
81
        "$DHFILE"
85
82
    sed --in-place --expression='1i-----BEGIN DH PARAMETERS-----' \
86
83
            "$DHFILE"
87
 
    cp --archive "$DHFILE" /etc/keys/mandos/client-dhparams.pem
 
84
    cp --archive "$DHFILE" /etc/keys/mandos/dhparams.pem
88
85
    rm -- "$DHFILE"
89
86
}
90
87
 
94
91
        create_key "$@"
95
92
        create_dh_params "$@" || :
96
93
        update_initramfs "$@"
 
94
        if dpkg --compare-versions "$2" lt-nl "1.7.10-1"; then
 
95
            PLUGINHELPERDIR=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)/mandos/plugin-helpers
 
96
            if ! dpkg-statoverride --list "$PLUGINHELPERDIR" \
 
97
                 >/dev/null 2>&1; then
 
98
                chmod u=rwx,go= -- "$PLUGINHELPERDIR"
 
99
            fi
 
100
            if ! dpkg-statoverride --list /etc/mandos/plugin-helpers \
 
101
                 >/dev/null 2>&1; then
 
102
                chmod u=rwx,go= -- /etc/mandos/plugin-helpers
 
103
            fi
 
104
        fi
97
105
        ;;
98
106
    abort-upgrade|abort-deconfigure|abort-remove)
99
107
        ;;