From 4019909aeccca5389b8aee7acca80753748c4fdb Mon Sep 17 00:00:00 2001 From: tschettervictor Date: Wed, 29 Oct 2025 08:32:20 -0600 Subject: [PATCH] pkgbase: fix upgrade --- usr/local/share/bastille/upgrade.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/local/share/bastille/upgrade.sh b/usr/local/share/bastille/upgrade.sh index 9341685f..516d6f34 100644 --- a/usr/local/share/bastille/upgrade.sh +++ b/usr/local/share/bastille/upgrade.sh @@ -281,7 +281,10 @@ else PKGBASE=1 fi fi - OLD_RELEASE="$(${bastille_jailsdir}/${TARGET}/root/freebsd-version)" + OLD_RELEASE="$(${bastille_jailsdir}/${TARGET}/root/etc/freebsd-version)" + if [ -z "${OLD_RELEASE}" ]; then + OLD_RELEASE="$(bastille config ${TARGET} get osrelease)" + fi OLD_MINOR_VERSION=$(echo ${OLD_RELEASE} | sed -E 's/^[0-9]+\.([0-9]+)-.*$/\1/') OLD_MAJOR_VERSION=$(echo ${OLD_RELEASE} | grep -Eo '^[0-9]+') NEW_MINOR_VERSION=$(echo ${NEW_RELEASE} | sed -E 's/^[0-9]+\.([0-9]+)-.*$/\1/')