[Alternative PATCH 2/2] fff-hoodutils: Add fallback for upgrade path

Fabian Bläse fabian at blaese.de
Mi Nov 20 22:27:45 CET 2019


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 <fabian at blaese.de>
---
 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
-- 
2.24.0



Mehr Informationen über die Mailingliste franken-dev