~ubuntu-branches/ubuntu/oneiric/ca-certificates-java/oneiric-updates

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-30 10:09:16 UTC
  • Revision ID: james.westby@ubuntu.com-20110530100916-6pobyo1dzb0802ll
Tags: 20110426ubuntu1
Work-around multiarch libnss3 update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
first_install()
25
25
{
 
26
    if which dpkg-query --version >/dev/null; then
 
27
        nsspkg=$(dpkg-query -L libnss3 | sed -n 's,\(.*\)/libnss3\.so$,\1,p')
 
28
        nssjdk=$(sed -n '/nssLibraryDirectory/s/.*= *\(.*\)/\1/p' /etc/$jvm/security/nss.cfg)
 
29
        if [ "$nsspkg" != "$nssjdk" ]; then
 
30
            ln -sf $nsspkg/libnss3.so $nssjdk/libnss3.so
 
31
        fi
 
32
    fi
 
33
 
26
34
    find /etc/ssl/certs -name \*.pem | \
27
35
    while read filename; do
28
36
        alias=$(basename $filename .pem | tr A-Z a-z | tr -cs a-z0-9 _)
37
45
    echo "done."
38
46
}
39
47
 
 
48
do_cleanup()
 
49
{
 
50
    [ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
 
51
    if [ "$nsspkg" != "$nssjdk" ]; then
 
52
        rm -f $nssjdk/libnss3.so
 
53
    fi
 
54
}
 
55
 
40
56
case "$1" in
41
57
    configure)
42
58
        if dpkg --compare-versions "$2" le "20100412"; then
60
76
                printf -- "-server KNOWN\n" > $temp_jvm_cfg
61
77
            fi
62
78
 
63
 
            first_install
64
 
 
65
 
            [ -z "$temp_jvm_cfg" ] || rm -f $temp_jvm_cfg
 
79
            if first_install; then
 
80
                do_cleanup
 
81
            else
 
82
                do_cleanup
 
83
                exit 1
 
84
            fi
66
85
        fi
67
86
        chmod 600 /etc/default/cacerts || true
68
87
    ;;