--- usr.sbin/freebsd-update/freebsd-update.sh.orig +++ 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