Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2022 16:20:26 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 261446] freebsd-update should not create boot environment when it's not making changes to the boot environment
Message-ID:  <bug-261446-227-aZRqnklsFR@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-261446-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

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.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-261446-227-aZRqnklsFR>