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

Adrian Schmutzler freifunk at adrianschmutzler.de
So Jul 8 19:57:38 CEST 2018


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
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev