svn commit: r361023 - head/usr.sbin/certctl

Kyle Evans kevans at FreeBSD.org
Thu May 14 03:30:28 UTC 2020


Author: kevans
Date: Thu May 14 03:30:27 2020
New Revision: 361023
URL: https://svnweb.freebsd.org/changeset/base/361023

Log:
  certctl: follow-up to r361022, prune blacklist as well
  
  Otherwise, removals from the blacklist may not get processed as they should.
  
  While we're here, restructure these to not bother with mkdir(1) if we've
  already tested them to exist.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/certctl/certctl.sh

Modified: head/usr.sbin/certctl/certctl.sh
==============================================================================
--- head/usr.sbin/certctl/certctl.sh	Thu May 14 03:25:12 2020	(r361022)
+++ head/usr.sbin/certctl/certctl.sh	Thu May 14 03:30:27 2020	(r361023)
@@ -143,9 +143,16 @@ cmd_rehash()
 {
 
 	if [ $NOOP -eq 0 ]; then
-		[ -e "$CERTDESTDIR" ] && find "$CERTDESTDIR" -type link -delete
-		mkdir -p "$CERTDESTDIR"
-		mkdir -p "$BLACKLISTDESTDIR"
+		if [ -e "$CERTDESTDIR" ]; then
+			find "$CERTDESTDIR" -type link -delete
+		else
+			mkdir -p "$CERTDESTDIR"
+		fi
+		if [ -e "$BLACKLISTDESTDIR" ]; then
+			find "$BLACKLISTDESTDIR" -type link -delete
+		else
+			mkdir -p "$BLACKLISTDESTDIR"
+		fi
 	fi
 
 	do_scan create_blacklisted "$BLACKLISTPATH"


More information about the svn-src-all mailing list