Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2020 21:39:02 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r360394 - in stable: 11/usr.sbin/freebsd-update 12/usr.sbin/freebsd-update
Message-ID:  <202004272139.03RLd2hQ094357@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Apr 27 21:39:01 2020
New Revision: 360394
URL: https://svnweb.freebsd.org/changeset/base/360394

Log:
  MFC r360287: freebsd-update: rehash certs
  
  With the inclusion of caroot bits, we'll need to also rehash on update as we
  do in mergemaster/etcupdate.
  
  If certctl's installed on the system, just unconditionally rehash. This
  isn't an expensive operation, and we can refine it to compare
  INDEX-{OLD,NEW} later if we really want to.

Modified:
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/freebsd-update/freebsd-update.sh
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- stable/12/usr.sbin/freebsd-update/freebsd-update.sh	Mon Apr 27 21:19:46 2020	(r360393)
+++ stable/12/usr.sbin/freebsd-update/freebsd-update.sh	Mon Apr 27 21:39:01 2020	(r360394)
@@ -2876,7 +2876,7 @@ install_delete () {
 	rm newfiles killfiles
 }
 
-# Install new files, delete old files, and update linker.hints
+# Install new files, delete old files, and update generated files
 install_files () {
 	# If we haven't already dealt with the kernel, deal with it.
 	if ! [ -f $1/kerneldone ]; then
@@ -2943,6 +2943,11 @@ Kernel updates have been installed.  Please reboot and
 		    grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
 		install_from_index INDEX-NEW || return 1
 		install_delete INDEX-OLD INDEX-NEW || return 1
+
+		# Rehash certs if we actually have certctl installed.
+		if which certctl>/dev/null; then
+			env DESTDIR=${BASEDIR} certctl rehash
+		fi
 
 		# Rebuild generated pwd files.
 		if [ ${BASEDIR}/etc/master.passwd -nt ${BASEDIR}/etc/spwd.db ] ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004272139.03RLd2hQ094357>