]> git.donarmstrong.com Git - ca-certificates.git/blobdiff - sbin/update-ca-certificates
Imported Debian version 20061027
[ca-certificates.git] / sbin / update-ca-certificates
index 5c349e21d0f40f10904c9248b450bfa26cb836e8..baa1bb92e7a28868df80564d1114ee221baf4720 100644 (file)
@@ -41,7 +41,16 @@ CERTBUNDLE=ca-certificates.crt
 cd /etc/ssl/certs
 if [ "$fresh" = 1 ]; then
   echo -n "Clearing symlinks in /etc/ssl/certs..."
-  find . -type l -print0 | xargs -0 rm -f
+  find . -type l -print | while read symlink
+  do
+     case $(readlink $symlink) in
+     $CERTSDIR*) rm -f $symlink;;
+     esac
+  done
+  find . -type l -print | while read symlink
+  do
+     test -f $symlink || rm -f $symlink
+  done
   echo "done."
 fi
 echo -n "Updating certificates in /etc/ssl/certs...."