firmware: add GUI backend update glue

This performs the full update, now we need to figure out how
this will look from the frontend side...
This commit is contained in:
Franco Fichtner 2017-07-09 12:09:30 +02:00
parent 1b970b3752
commit 7e7af55d02

View File

@ -45,6 +45,20 @@ if [ "$PACKAGE" == "all" ]; then
REBOOT=1
fi
fi
elif [ "$PACKAGE" == "maj" ]; then
# extract info for major upgrade
UPGRADE="/usr/local/opnsense/firmware-upgrade"
NAME="does.not.exist"
if [ -f ${UPGRADE} ]; then
NAME=$(cat ${UPGRADE})
fi
# perform first half of major upgrade
# (download all + kernel install)
if opnsense-update -ur "${NAME}" >> ${PKG_PROGRESS_FILE} 2>&1; then
REBOOT=1
fi
# second half reboots multiple times,
# but will snap the GUI back when done
elif [ "$PACKAGE" == "pkg" ]; then
pkg upgrade -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
echo "*** PLEASE CHECK FOR MORE UPGRADES"