From cb0420e2d3876b2b9f1596163421f854b5e6e524 Mon Sep 17 00:00:00 2001
From: Fabian Blaese <fabian@blaese.de>
Date: Mon, 3 Dec 2018 20:54:55 +0100
Subject: [PATCH] configurehood: Don't offer hoodfile when using local hoodfile
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When using local hoodfile neither this nor central hoodfile
downloaded earlier should be offered to neighbours, so remove it
from the webroot.

Signed-off-by: Fabian Bläse <fabian@blaese.de>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Robert Langhammer <rlanghammer@web.de>
---
 src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index 4ae1364a..2d448fca 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -77,6 +77,9 @@ if [ -s "$hoodfilewww" ] && isGatewayAvailable ; then
 fi
 
 if [ -s "$hoodfilelocal" ]; then
+	# remove webroot hoodfile to prevent offering local hoodfiles to neighbours
+	rm -f "$hoodfilewww"
+
 	cp "$hoodfilelocal" "$hoodfiletmp"
 	echo "Use local hood file"
 else
-- 
GitLab