upgrade: “not set” = “no release””

This commit is contained in:
tschettervictor
2025-05-15 08:20:00 -06:00
committed by GitHub
parent 901889aa5c
commit 64968b51d1

View File

@@ -164,7 +164,7 @@ jail_upgrade() {
# Upgrade a thin jail
if grep -qw "${bastille_jailsdir}/${_jailname}/root/.bastille" "${bastille_jailsdir}/${_jailname}/fstab"; then
if [ -z "${_oldrelease}" ]; then
if [ "${_oldrelease}" = "not set" ]; then
_oldrelease="$(grep "${bastille_releasesdir}.*\.bastille.*nullfs.*" "${bastille_jailsdir}/${_jailname}/fstab" | awk -F"/releases/" '{print $2}' | awk '{print $1}')"
fi
local _newrelease="${NEWRELEASE}"