-#! /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() {
-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)