Page MenuHomeFreeBSD

D34257.diff
No OneTemporary

D34257.diff

diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh
--- a/usr.sbin/freebsd-update/freebsd-update.sh
+++ b/usr.sbin/freebsd-update/freebsd-update.sh
@@ -890,7 +890,12 @@
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
+ # Operating on roots that aren't located at / will, more often than not,
+ # not touch the boot environment.
+ if [ "$BASEDIR" != "/" ]; then
+ return 1
fi
# Create a boot environment if enabled
if [ ${BOOTENV} = yes ]; then
@@ -911,7 +916,7 @@
esac
if [ ${CREATEBE} = yes ]; then
echo -n "Creating snapshot of existing boot environment... "
- VERSION=`freebsd-version -k`
+ VERSION=`freebsd-version -ku | sort -V | tail -n 1`
TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"`
bectl create ${VERSION}_${TIMESTAMP}
if [ $? -eq 0 ]; then

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 8, 2:37 PM (4 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34848067
Default Alt Text
D34257.diff (945 B)

Event Timeline