mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
firmware: fix upgrade when major upgrades are allowed but not available; closes #1804
We abort on error, the error is that the file is not there. Mea culpa.
This commit is contained in:
parent
b805277a00
commit
bc1ff72e01
@ -27,6 +27,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
UPGRADEFILE="/usr/local/opnsense/firmware-upgrade"
|
||||
LOCKFILE="/tmp/pkg_upgrade.progress"
|
||||
PIPEFILE="/tmp/pkg_upgrade.pipe"
|
||||
TEE="/usr/bin/tee -a"
|
||||
@ -34,8 +35,8 @@ RELEASE=
|
||||
|
||||
if [ "${1}" = "upgrade" -a -n "${2}" ]; then
|
||||
RELEASE=${2}
|
||||
elif [ "${1}" = "ALLOW_RISKY_MAJOR_UPGRADE" ]; then
|
||||
RELEASE=$(cat /usr/local/opnsense/firmware-upgrade 2> /dev/null)
|
||||
elif [ "${1}" = "ALLOW_RISKY_MAJOR_UPGRADE" -a -f ${UPGRADEFILE} ]; then
|
||||
RELEASE=$(cat ${UPGRADEFILE})
|
||||
fi
|
||||
|
||||
: > ${LOCKFILE}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user