summaryrefslogtreecommitdiffstats
path: root/abs/core/ca-certificates/ca-certificates.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-08-06 22:31:19 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-08-06 22:31:19 (GMT)
commit86c7502f5ac578b5d97d659f68badf449bea4cb8 (patch)
tree9ac46283043986461800b26b75b2118b9fd74723 /abs/core/ca-certificates/ca-certificates.install
parent85d78f35cc282e57f8eeba35a0be0156e44e654f (diff)
downloadlinhes_pkgbuild-86c7502f5ac578b5d97d659f68badf449bea4cb8.zip
linhes_pkgbuild-86c7502f5ac578b5d97d659f68badf449bea4cb8.tar.gz
linhes_pkgbuild-86c7502f5ac578b5d97d659f68badf449bea4cb8.tar.bz2
ca-certificates 20122063
Diffstat (limited to 'abs/core/ca-certificates/ca-certificates.install')
-rw-r--r--abs/core/ca-certificates/ca-certificates.install23
1 files changed, 21 insertions, 2 deletions
diff --git a/abs/core/ca-certificates/ca-certificates.install b/abs/core/ca-certificates/ca-certificates.install
index bd3cf6d..3d8b87d 100644
--- a/abs/core/ca-certificates/ca-certificates.install
+++ b/abs/core/ca-certificates/ca-certificates.install
@@ -1,7 +1,26 @@
+export LC_ALL=C
+
post_install() {
- usr/sbin/update-ca-certificates --fresh &> /dev/null
+ usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
}
post_upgrade() {
- post_install
+ if [ $(vercmp $2 20110421-1) -lt 0 ]; then
+ echo 'Updating certificates. This might take a while...'
+ fi
+ usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
+}
+
+pre_remove() {
+ # clean up certificates
+ local _backup=$(mktemp)
+ mv etc/ca-certificates.conf ${_backup}
+ echo > etc/ca-certificates.conf
+ usr/sbin/update-ca-certificates --fresh >/dev/null 2>&1
+ mv ${_backup} etc/ca-certificates.conf
+}
+
+post_remove() {
+ # remove the cert file if it is empty
+ [[ -s etc/ssl/certs/ca-certificates.crt ]] || rm -f etc/ssl/certs/ca-certificates.crt
}