The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d37214da968b8f381e7b67f80607e0865d873f5e
commit d37214da968b8f381e7b67f80607e0865d873f5e Author: Ed Maste <[email protected]> AuthorDate: 2024-12-10 13:47:34 +0000 Commit: Ed Maste <[email protected]> CommitDate: 2026-02-27 19:59:04 +0000 freebsd-update: Error for -b basedir without UNAME_r set freebsd-update sets the currently running release from UNAME -r, which can be overridden via the --currently-running commandline option (or by setting UNAME_r in the environment). This may be invalid if -b is used to specify a basedir other than /, so error out if -b is specified without setting the currently running version. PR: 283229 Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48016 (cherry picked from commit 097458ac665db732cc91a22279da4cc14f694da2) --- usr.sbin/freebsd-update/freebsd-update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index d9db4fa4bf6b..c77f4b18fc61 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -755,6 +755,10 @@ fetchupgrade_check_params () { esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 + if [ "$BASEDIR" != / ] && [ -z "$UNAME_r" ]; then + echo "$(basename $0): -b basedir requires --currently-running to be specified." + exit 1 + fi # Generate release number. The s/SECURITY/RELEASE/ bit exists # to provide an upgrade path for FreeBSD Update 1.x users, since
