[PATCH 1/2] configurehood: Wait with hood file retrieval to allow deletion
Tim Niemeyer
tim at tn-x.org
Fr Mär 16 20:03:48 CET 2018
Moin
Am Donnerstag, den 08.03.2018, 21:24 +0100 schrieb Adrian Schmutzler:
> 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;
Wir sind hier an der Stelle, wo wir ein Gateway in der Nähe haben.
Gelöscht wird $hoodfilecopy auf einem Knoten, wenn es kein Gateway hat.
An der Stelle hier sind wir aber per Eth verbunden -> alle haben die
selben Gateways.
Tim
PS: Sleep ist keine Adäquate Lösung für Probleme der Nebenläufigkeit!
+
> > # check eth first
> > oldhood=""
> > ethfile="${hoodfile}eth"
> --
> 2.7.4
>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : signature.asc
Dateityp : application/pgp-signature
Dateigröße : 488 bytes
Beschreibung: This is a digitally signed message part
URL : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20180316/d855e9a6/attachment.sig>
Mehr Informationen über die Mailingliste franken-dev