From be04d3678439179798aa9f8e8d036fc44aabeb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Wed, 20 Nov 2019 22:27:44 +0100 Subject: [PATCH] fff-hoodutils: Adjust upgrade path function for changed folder structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we now have multiple variants, the binaries on the update server should be seperated into different directories. To allow the firmware to decide which variant it wants to download, the "$VARIANT/current" part is removed from the hoodfiles. Instead it is added inside the upgrade path function in fff-hoodutils. Signed-off-by: Fabian Bläse Reviewed-by: Christian Dresel --- .../fff/fff-hoodutils/files/lib/functions/fff/keyxchange | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 a18926e9..faaa85f7 100644 --- a/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange +++ b/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange @@ -2,6 +2,7 @@ # License GPLv3 . /usr/share/libubox/jshn.sh +. /etc/firmware_release hoodfiletmp="/tmp/hoodfile" hoodfileref="/tmp/hoodfileref" @@ -21,14 +22,19 @@ getJsonPath() { getUpgradePath() { jsonfile="$(getJsonPath)" + local upgrade_path if [ -n "$jsonfile" ] ; then json_load "$(cat "$jsonfile")" json_select hood json_get_var upath upgrade_path - echo "$upath" + upgrade_path="$upath" else return 1 fi + + # add full firmware path for current firmwares variant + echo "${upgrade_path}/${VARIANT}/current" + return 0 }