From 7e7af55d02ea87456d90ea84625c807dba22eb2e Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sun, 9 Jul 2017 12:09:30 +0200 Subject: [PATCH] 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... --- src/opnsense/scripts/firmware/upgrade.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/opnsense/scripts/firmware/upgrade.sh b/src/opnsense/scripts/firmware/upgrade.sh index 5ceaaed25..388ee67c7 100755 --- a/src/opnsense/scripts/firmware/upgrade.sh +++ b/src/opnsense/scripts/firmware/upgrade.sh @@ -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"