[4/4] sysupgrade: Add upgrade path fallback

Submitted by Fabian Blaese on Nov. 19, 2019, 8:19 p.m.

Details

Message ID 20191119201940.70424-4-fabian@blaese.de
State Rejected
Headers show

Commit Message

Fabian Blaese Nov. 19, 2019, 8:19 p.m.
If no hoodfile is present or hoodfile support is not compiled
into the firmware, no upgrade path is available.

Therefore a fallback to our default firmware host is added.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
---
This patch depends on changes made in Patch 3/4 of this series
---
 src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
index 6133966..dea6ccb 100755
--- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
+++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
@@ -7,9 +7,8 @@  cd /tmp/
 UPGRADE_PATH="$(getUpgradePath)"
 
 if [ -z "$UPGRADE_PATH" ]; then
-  echo "Upgrade path not set! Aborting."
-  echo ""
-  exit 1
+  UPGRADE_PATH="http://dev.freifunk-franken.de"
+  echo "Upgrade path not set! Falling back to $UPGRADE_PATH"
 fi
 
 #add firmware path to UPGRADE_PATH

Comments

Christian Dresel Nov. 19, 2019, 8:35 p.m.
nach etwas überlegen, dann doch mit einverstanden

Reviewed-by: Christian Dresel <fff@chrisi01.de>

Gruß

Christian

On 19.11.19 21:19, Fabian Bläse wrote:
> If no hoodfile is present or hoodfile support is not compiled
> into the firmware, no upgrade path is available.
> 
> Therefore a fallback to our default firmware host is added.
> 
> Signed-off-by: Fabian Bläse <fabian@blaese.de>
> ---
> This patch depends on changes made in Patch 3/4 of this series
> ---
>  src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> index 6133966..dea6ccb 100755
> --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> @@ -7,9 +7,8 @@ cd /tmp/
>  UPGRADE_PATH="$(getUpgradePath)"
>  
>  if [ -z "$UPGRADE_PATH" ]; then
> -  echo "Upgrade path not set! Aborting."
> -  echo ""
> -  exit 1
> +  UPGRADE_PATH="http://dev.freifunk-franken.de"
> +  echo "Upgrade path not set! Falling back to $UPGRADE_PATH"
>  fi
>  
>  #add firmware path to UPGRADE_PATH
>
Adrian Schmutzler Nov. 19, 2019, 11:32 p.m.
Hi,

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces@freifunk.net] On Behalf
> Of Fabian Bläse
> Sent: Dienstag, 19. November 2019 21:20
> To: franken-dev@freifunk.net
> Subject: [PATCH 4/4] sysupgrade: Add upgrade path fallback
> 
> If no hoodfile is present or hoodfile support is not compiled into the
> firmware, no upgrade path is available.
> 
> Therefore a fallback to our default firmware host is added.
> 
> Signed-off-by: Fabian Bläse <fabian@blaese.de>
> ---
> This patch depends on changes made in Patch 3/4 of this series
> ---
>  src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> index 6133966..dea6ccb 100755
> --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
> @@ -7,9 +7,8 @@ cd /tmp/
>  UPGRADE_PATH="$(getUpgradePath)"
> 
>  if [ -z "$UPGRADE_PATH" ]; then
> -  echo "Upgrade path not set! Aborting."
> -  echo ""
> -  exit 1
> +  UPGRADE_PATH="http://dev.freifunk-franken.de"

Kein https?

Mir stellt sich hier die Frage, ob man das ggf. in die /etc/firmware_release tun will, anstatt es irgendwo in der Firmware hardzucoden. Ich bin mir aber nicht sicher, ist nur so ne blöde Idee.

Grüße

Adrian

> +  echo "Upgrade path not set! Falling back to $UPGRADE_PATH"
>  fi
> 
>  #add firmware path to UPGRADE_PATH
> --
> 2.24.0
Fabian Blaese Nov. 20, 2019, 4:21 p.m.
On 20.11.19 00:32, mail@adrianschmutzler.de wrote:
>> diff --git a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
>> b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
>> index 6133966..dea6ccb 100755
>> --- a/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
>> +++ b/src/packages/fff/fff-sysupgrade/files/etc/sysupgrade.sh
>> @@ -7,9 +7,8 @@ cd /tmp/
>>  UPGRADE_PATH="$(getUpgradePath)"
>>
>>  if [ -z "$UPGRADE_PATH" ]; then
>> -  echo "Upgrade path not set! Aborting."
>> -  echo ""
>> -  exit 1
>> +  UPGRADE_PATH="http://dev.freifunk-franken.de"
> 
> Kein https?
Ja, denn damit kann unsere Firmware leider je nach Kommando nicht (wget) oder nicht sinnvoll (curl) [wir haben keinen Trust Anchor] umgehen. :-(

> Mir stellt sich hier die Frage, ob man das ggf. in die /etc/firmware_release tun will, anstatt es irgendwo in der Firmware hardzucoden. Ich bin mir aber nicht sicher, ist nur so ne blöde Idee.
Eine zentrale Konfiguration für solche Dinge wäre denkbar, firmware_release beschreibt aber nur den Build, da gehört es mMn nicht rein.

Gruß
Fabian