From patchwork Wed Nov 20 21:27:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Alternative,2/2] fff-hoodutils: Add fallback for upgrade path From: Fabian Blaese X-Patchwork-Id: 1224 Message-Id: <20191120212745.11802-2-fabian@blaese.de> To: franken-dev@freifunk.net Date: Wed, 20 Nov 2019 22:27:45 +0100 If no hoodfile is present or hoodfile support is not compiled into the firmware, no upgrade path is available. This currently is the case for layer3 variant. A fallback to our default firmware host is added. At the moment both variants don't have a trust anchor for TLS and the wget, that is currently used, doesn't support TLS. Therefore it is currently necessary to use a unencrypted http URL. Signed-off-by: Fabian Bläse Reviewed-by: Christian Dresel --- src/packages/fff/fff-hoodutils/Makefile | 2 +- .../fff/fff-hoodutils/files/lib/functions/fff/keyxchange | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-hoodutils/Makefile b/src/packages/fff/fff-hoodutils/Makefile index 57e55b2..90087ea 100644 --- a/src/packages/fff/fff-hoodutils/Makefile +++ b/src/packages/fff/fff-hoodutils/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-hoodutils -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange b/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange index faaa85f..a1028ee 100644 --- a/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange +++ b/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange @@ -30,7 +30,8 @@ getUpgradePath() { json_get_var upath upgrade_path upgrade_path="$upath" else - return 1 + upgrade_path="http://dev.freifunk-franken.de" + >&2 echo "Upgrade path not set! Falling back to $upgrade_path" fi # add full firmware path for current firmwares variant