[PATCH v3 4/5] hood files: Move files from /www to /tmp and link there

Robert Langhammer rlanghammer at web.de
Mo Jul 9 14:28:49 CEST 2018


Ja, das in /tmp zu machen finde ich auch gut.

Reviewed-by: Robert Langhammer <rlanghammer at web.de>


Am 08.07.2018 um 19:57 schrieb Adrian Schmutzler:
> With this patch, changing the hood file happens in
> memory, so we do not have to write on flash "frequently".
>
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
>
> ---
>
> Changes in v2:
> none
>
> Changes in v3:
> Remove references to sector file
> ---
>  src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange | 2 +-
>  src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd     | 4 ++++
>  2 files changed, 5 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 40ebe4f..e601e0d 100644
> --- a/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange
> +++ b/src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange
> @@ -6,7 +6,7 @@
>  
>  hoodfiletmp="/tmp/hoodfile"
>  hoodfileref="/tmp/hoodfileref"
> -hoodfilewww="/www/hood/keyxchangev2data"
> +hoodfilewww="/tmp/hoodfilewww"
>  
>  getJsonPath() {
>  	jsonfile=""
> diff --git a/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd b/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> index 42376ad..248a78b 100644
> --- a/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> +++ b/src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd
> @@ -1,5 +1,9 @@
>  #!/bin/sh
>  
> +. /lib/functions/fff/keyxchange
> +
> +ln -s "$hoodfilewww" /www/hood/keyxchangev2data
> +
>  uci batch <<EOF
>    delete uhttpd.main
>    delete uhttpd.public



Mehr Informationen über die Mailingliste franken-dev