From patchwork Wed Jun 13 14:36:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/4] hood/sector files: Move files from /www to /tmp and link there From: Adrian Schmutzler X-Patchwork-Id: 860 Message-Id: <1528900566-9555-5-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Wed, 13 Jun 2018 16:36:06 +0200 With this patch, changing the hood and sector files happens in memory, so we do not have to write on flash "frequently". Signed-off-by: Adrian Schmutzler --- src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 1 - src/packages/fff/fff-hoodutils/files/lib/functions/fff/keyxchange | 4 +++- src/packages/fff/fff-web/files/etc/uci-defaults/93-fff-uhttpd | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood index 1c1eda7..dd76af9 100755 --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood @@ -9,7 +9,6 @@ sectorfilelocal=/etc/sectorfile sectorfiletmp=/tmp/sectorfile -sectorfilewww=/www/hood/sectorfile hoodfilelocal=/etc/hoodfile hoodfileisauth=/tmp/hoodfileisauth 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..c0e35ac 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,9 @@ hoodfiletmp="/tmp/hoodfile" hoodfileref="/tmp/hoodfileref" -hoodfilewww="/www/hood/keyxchangev2data" +hoodfilewww="/tmp/hoodfilewww" + +sectorfilewww="/tmp/sectorfilewww" 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..bb99900 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,10 @@ #!/bin/sh +. /lib/functions/fff/keyxchange + +ln -s "$hoodfilewww" /www/hood/keyxchangev2data +ln -s "$sectorfilewww" /www/hood/sectorfile + uci batch <