]> git.donarmstrong.com Git - ca-certificates.git/blobdiff - debian/postinst
Update release to 20121105
[ca-certificates.git] / debian / postinst
index b2772819c3f2cc6dad4a9cc324505907520cb3b3..198c57e0bc245aedc61c54dbcc17d1ee34ab1c33 100644 (file)
@@ -1,4 +1,4 @@
-#! /bin/sh -e
+#! /bin/sh
 # postinst script for ca-certificates
 #
 # see: dh_installdeb(1)
@@ -20,6 +20,8 @@
 #     installation fails and the `postinst' is called with `abort-upgrade',
 #     `abort-remove' or `abort-deconfigure'.
 
+set -e
+
 each_value() {
  echo "$1" |tr ',' '\n' | sed -e 's/^[[:space:]]*//' 
 }
@@ -137,13 +139,12 @@ EOF
                -e 's/^[[:space:]]*1[[:space:]]*/!/' \
            >> /etc/ca-certificates.conf
        fi
-       update-ca-certificates
-       # Call c_rehash when upgrading from older versions to that we
-       # have both the old and new style of symlink
-       if [ ! -z "$2" ]; then
-         if dpkg --compare-versions "$2" le 20090814+nmu3; then
-           c_rehash
-         fi
+       # fix bogus symlink to ca-certificates.crt on upgrades; see
+       # Debian #643667; drop after wheezy
+       if dpkg --compare-versions "$2" lt-nl 20111025; then
+           update-ca-certificates --fresh
+       else
+           update-ca-certificates
        fi
     ;;