]>
Commit | Line | Data |
---|---|---|
fba66a45 ER |
1 | --- ca-certificates-20140223/sbin/update-ca-certificates 2014-03-14 14:42:21.171246343 +0200 |
2 | +++ ca-certificates-20140223/sbin/update-ca-certificates 2014-03-14 14:46:50.556014888 +0200 | |
53d36f70 ER |
3 | @@ -41,6 +41,7 @@ |
4 | done | |
5 | ||
6 | CERTSCONF=$DESTDIR/etc/ca-certificates.conf | |
7 | +CERTSCONFD=$DESTDIR/etc/ca-certificates.d | |
8 | CERTSDIR=$DESTDIR/usr/share/ca-certificates | |
9 | LOCALCERTSDIR=$DESTDIR/etc/certs | |
10 | CERTBUNDLE=$DESTDIR/etc/certs/ca-certificates.crt | |
11 | @@ -105,25 +106,30 @@ | |
12 | ||
13 | echo -n "Updating certificates in $ETCCERTSDIR... " | |
14 | ||
15 | -# Handle certificates that should be removed. This is an explicit act | |
16 | -# by prefixing lines in the configuration files with exclamation marks (!). | |
17 | -sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt | |
18 | -do | |
19 | - remove "$CERTSDIR/$crt" | |
20 | -done | |
21 | +for conf in $CERTSCONF $CERTSCONFD/*.conf; do | |
22 | + # skip inexistent files (matched by glob) | |
23 | + [ -f $conf ] || continue | |
24 | + | |
25 | + # Handle certificates that should be removed. This is an explicit act | |
26 | + # by prefixing lines in the configuration files with exclamation marks (!). | |
27 | + sed -n -e '/^$/d' -e 's/^!//p' $conf | while read crt | |
28 | + do | |
29 | + remove "$CERTSDIR/$crt" | |
30 | + done | |
31 | ||
32 | -sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt | |
33 | -do | |
34 | - if test -f "$CERTSDIR/$crt" | |
fba66a45 | 35 | - then |
53d36f70 ER |
36 | - add "$CERTSDIR/$crt" |
37 | - elif test -f "$LOCALCERTSDIR/$crt" | |
38 | - then | |
39 | - add "$LOCALCERTSDIR/$crt" | |
40 | - else | |
41 | - echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $CERTSCONF." >&2 | |
42 | - continue | |
43 | - fi | |
44 | + sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $conf | while read crt | |
45 | + do | |
46 | + if test -f "$CERTSDIR/$crt" | |
47 | + then | |
48 | + add "$CERTSDIR/$crt" | |
49 | + elif test -f "$LOCALCERTSDIR/$crt" | |
50 | + then | |
51 | + add "$LOCALCERTSDIR/$crt" | |
52 | + else | |
53 | + echo "W: $CERTSDIR/$crt or $LOCALCERTSDIR/$crt not found, but listed in $conf." >&2 | |
54 | + continue | |
55 | + fi | |
56 | + done | |
57 | done | |
58 | ||
59 | rm -f "$CERTBUNDLE" |