diff options
author | Paul Wise <pabs@debian.org> | 2014-12-28 14:41:57 +0800 |
---|---|---|
committer | Michael Shuler <michael@pbandjelly.org> | 2015-01-17 13:30:29 -0600 |
commit | fd660d3b75f2b35c84be22e73fad9fae0e401308 (patch) | |
tree | 017c4056798ba256277f7e93936f4a31f8ecb9ac /sbin/update-ca-certificates | |
parent | 171cf7716b56ac869836a656fadac54fec342382 (diff) | |
download | ca-certificates-fd660d3b75f2b35c84be22e73fad9fae0e401308.tar.gz |
Allow customisation of the paths used by update-ca-certificates
Diffstat (limited to 'sbin/update-ca-certificates')
-rwxr-xr-x | sbin/update-ca-certificates | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates index 9303b07..bc56da5 100755 --- a/sbin/update-ca-certificates +++ b/sbin/update-ca-certificates @@ -23,6 +23,13 @@ verbose=0 fresh=0 +CERTSCONF=/etc/ca-certificates.conf +CERTSDIR=/usr/share/ca-certificates +LOCALCERTSDIR=/usr/local/share/ca-certificates +CERTBUNDLE=ca-certificates.crt +ETCCERTSDIR=/etc/ssl/certs +HOOKSDIR=/etc/ca-certificates/update.d + while [ $# -gt 0 ]; do case $1 in @@ -30,6 +37,24 @@ do verbose=1;; --fresh|-f) fresh=1;; + --certsconf) + shift + CERTSCONF="$1";; + --certsdir) + shift + CERTSDIR="$1";; + --localcertsdir) + shift + LOCALCERTSDIR="$1";; + --certbundle) + shift + CERTBUNDLE="$1";; + --etccertsdir) + shift + ETCCERTSDIR="$1";; + --hooksdir) + shift + HOOKSDIR="$1";; --help|-h|*) echo "$0: [--verbose] [--fresh]" exit;; @@ -37,11 +62,10 @@ do shift done -CERTSCONF=/etc/ca-certificates.conf -CERTSDIR=/usr/share/ca-certificates -LOCALCERTSDIR=/usr/local/share/ca-certificates -CERTBUNDLE=ca-certificates.crt -ETCCERTSDIR=/etc/ssl/certs +if [ ! -s "$CERTSCONF" ] +then + fresh=1 +fi cleanup() { rm -f "$TEMPBUNDLE" @@ -151,7 +175,9 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE" echo "$ADDED_CNT added, $REMOVED_CNT removed; done." -HOOKSDIR=/etc/ca-certificates/update.d +if [ -d "$HOOKSDIR" ] +then + echo -n "Running hooks in $HOOKSDIR...." VERBOSE_ARG= [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose @@ -162,5 +188,7 @@ do done echo "done." +fi + # vim:set et sw=2: |