]> git.pld-linux.org Git - packages/ca-certificates.git/blob - ca-certificates.d.patch
80b2ba2855ccba3a6abfd075334b840ccd92e125
[packages/ca-certificates.git] / ca-certificates.d.patch
1 --- ca-certificates-20120212/sbin/update-ca-certificates~       2012-05-12 16:08:15.813747796 +0300
2 +++ ca-certificates-20120212/sbin/update-ca-certificates        2012-05-12 16:09:57.727422190 +0300
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"
35 -  then
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"
This page took 0.039409 seconds and 2 git commands to generate.