From d968665704cfd8aec680830c0e1faacc5f50b961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Wed, 20 Nov 2019 22:27:45 +0100 Subject: [PATCH] fff-hoodutils: Add fallback for upgrade path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 57e55b20..90087ea1 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 faaa85f7..a1028eec 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