svn commit: r360287 - head/usr.sbin/freebsd-update
Kyle Evans
kevans at FreeBSD.org
Sat Apr 25 00:14:18 UTC 2020
Author: kevans
Date: Sat Apr 25 00:14:17 2020
New Revision: 360287
URL: https://svnweb.freebsd.org/changeset/base/360287
Log:
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.
Reviewed by: emaste, allanjude
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D21805
Modified:
head/usr.sbin/freebsd-update/freebsd-update.sh
Modified: head/usr.sbin/freebsd-update/freebsd-update.sh
==============================================================================
--- head/usr.sbin/freebsd-update/freebsd-update.sh Fri Apr 24 22:17:13 2020 (r360286)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh Sat Apr 25 00:14:17 2020 (r360287)
@@ -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 ] ||
More information about the svn-src-all
mailing list