fix STABLE update/upgrade

This commit is contained in:
tschettervictor
2025-12-03 16:26:34 -07:00
parent ff06eabf6f
commit a9c58a8fb7
2 changed files with 3 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ jail_check() {
# Validate update method
MINOR_VERSION=$(echo ${OLD_RELEASE} | sed -E 's/^[0-9]+\.([0-9]+)-.*$/\1/')
MAJOR_VERSION=$(echo ${OLD_RELEASE} | grep -Eo '^[0-9]+')
if echo "${OLD_RELEASE}" | grep -oq "\-CURRENT"; then
if echo "${OLD_RELEASE}" | grep -Eoq "(\-CURRENT|\-STABLE)"; then
FREEBSD_BRANCH="current"
else
FREEBSD_BRANCH="release"
@@ -272,7 +272,7 @@ release_check() {
# Validate update method
MINOR_VERSION=$(echo ${TARGET} | sed -E 's/^[0-9]+\.([0-9]+)-.*$/\1/')
MAJOR_VERSION=$(echo ${TARGET} | grep -Eo '^[0-9]+')
if echo "${TARGET}" | grep -oq "\-CURRENT"; then
if echo "${TARGET}" | grep -Eoq "(\-CURRENT|\-STABLE)"; then
FREEBSD_BRANCH="current"
else
FREEBSD_BRANCH="release"

View File

@@ -127,7 +127,7 @@ thick_jail_check() {
# Validate PKGBASE or non-PKGBASE
if pkg -r "${bastille_jailsdir}/${TARGET}/root" which /usr/bin/uname > /dev/null 2>&1; then
PKGBASE=1
if echo "${NEW_RELEASE}" | grep -oq "\-CURRENT"; then
if echo "${NEW_RELEASE}" | grep -Eoq "(\-CURRENT|\-STABLE)"; then
FREEBSD_BRANCH="current"
else
FREEBSD_BRANCH="release"