[Bug 261446] freebsd-update should not create boot environment when it's not making changes to the boot environment
Date: Fri, 28 Jan 2022 16:20:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261446
Kyle Evans <kevans@freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kevans@freebsd.org
--- Comment #3 from Kyle Evans <kevans@freebsd.org> ---
(In reply to Xin LI from comment #0)
Someone pointed out #2 last night in IRC, and I think that alone is EN worthy.
I think we want something like:
diff --git a/usr.sbin/freebsd-update/freebsd-update.sh
b/usr.sbin/freebsd-update/freebsd-update.sh
index 1776115d0776..73b5003ee036 100644
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -890,7 +890,12 @@ install_check_params () {
install_create_be () {
# Figure out if we're running in a jail and return if we are
if [ `sysctl -n security.jail.jailed` = 1 ]; then
- return 1
+ return 1
+ fi
+ # We may allow overriding the BASEDIR check at a later time via an
+ # argument, so separate this out.
+ if [ "$BASEDIR" != "/" ]; then
+ return 1
fi
# Create a boot environment if enabled
if [ ${BOOTENV} = yes ]; then
--
You are receiving this mail because:
You are the assignee for the bug.