From patchwork Thu Mar 8 20:24:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2] configurehood: Wait with hood file retrieval to allow deletion From: Adrian Schmutzler X-Patchwork-Id: 817 Message-Id: <1520540695-4303-1-git-send-email-freifunk@adrianschmutzler.de> To: franken-dev@freifunk.net Date: Thu, 8 Mar 2018 21:24:54 +0100 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 --- 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"