]> git.donarmstrong.com Git - ca-certificates.git/blobdiff - debian/postinst
Merge branch '682125-piuparts_fix'
[ca-certificates.git] / debian / postinst
index 35e1ef35c8c8c2b6ff8ae41c359673c88fae0577..198c57e0bc245aedc61c54dbcc17d1ee34ab1c33 100644 (file)
@@ -1,4 +1,4 @@
-#! /bin/sh -e
+#! /bin/sh
 # postinst script for ca-certificates
 #
 # see: dh_installdeb(1)
 #     installation fails and the `postinst' is called with `abort-upgrade',
 #     `abort-remove' or `abort-deconfigure'.
 
+set -e
+
 each_value() {
- echo "$l" |tr ',' '\n' | sed -e 's/^[[:space:]]*//' 
+ echo "$1" |tr ',' '\n' | sed -e 's/^[[:space:]]*//' 
 }
 
 memberp() {
  m="$1"
  l="$2"
- each_value "$1" | grep -q "^$m\$"
+ each_value "$l" | grep -q "^$m\$"
 }
 
 delca() {
@@ -137,7 +139,13 @@ EOF
                -e 's/^[[:space:]]*1[[:space:]]*/!/' \
            >> /etc/ca-certificates.conf
        fi
-       update-ca-certificates
+       # 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
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)