]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
freebsd-update: improve BE creation feature
authorKyle Evans <kevans@FreeBSD.org>
Sat, 12 Feb 2022 21:36:24 +0000 (15:36 -0600)
committerMark Johnston <markj@FreeBSD.org>
Tue, 15 Mar 2022 17:46:50 +0000 (13:46 -0400)
commitf0df8a13116dca6ac42334d23430160fbeaf6c09
treea79e51124b77d5955e5001df543a2e5b28ba770b
parent7895cf4ce4f7cb3bdf4f84388e97035cf256f97c
freebsd-update: improve BE creation feature

This addresses one nit and one bug in the BE creation feature of
freebsd-update:

The nit addressed is that it currently only names the BEs after the
userland version, but the kernel version may be higher.  After this
change, we request both and pass them through sort(1) to choose the
highest.  This is especially helpful if a freebsd-update patch touched
one but not the other.

The bug fixed is that roots updated that are not located at '/', e.g.,
by using -b or -j, will no longer create boot environments
automatically.  There's a very low chance these will actually change the
BE in any meaningful way, anyways.  It could make sense in the future
to allow an argument-override to create the BE anyways if someone comes
up with a non-standard setup, e.g., where a jail is an important part of
their boot environment on an appliance or some such setup.

Half of this patch is submitted by delphij@, the other half kevans@.

PR: 261446

(cherry picked from commit e01e8f911b935eabcc35b4d121951e4e21042ee5)
(cherry picked from commit 35d33d408213d20c63d60c0dfcdf77b2b36f5eee)

Approved by: so
Security: FreeBSD-EN-22:09.freebsd-update
usr.sbin/freebsd-update/freebsd-update.sh