[PATCH 1/2] configurehood: Wait with hood file retrieval to allow deletion

Adrian Schmutzler freifunk at adrianschmutzler.de
Do Mär 8 21:24:54 CET 2018


If we have a pool of routers connected by LAN, but without uplink,
they will loose gateway connection on a serious reconfiguration.

Then the routers should be able to delete their $hoodfilecopy
before it is access by other routers looking for a file.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
index 1b9fa2b..127ce5b 100755
--- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
+++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
@@ -137,7 +137,12 @@ else
 				wget -T15 -t5 "http://[fe80::1%w2sta]:2342/sectorfile" -O "$sectortmp" || wget -T15 -t5 "http://[fe80::1%w5sta]:2342/sectorfile" -O "$sectortmp"
 			fi
 		else
-			echo "We have a Gateway in Range, we load the keyxchangev2data from fe80::1"
+			echo "We have a Gateway in Range, we load the keyxchangev2data from network or gateway"
+
+			# We wait some time, so nodes without network connection can delete their $hoodfilecopy
+			# -> as a consequence, all hood files in the wired network are from devices with gateway connection
+			sleep 20;
+
 			# check eth first
 			oldhood=""
 			ethfile="${hoodfile}eth"
-- 
2.7.4



Mehr Informationen über die Mailingliste franken-dev