From 2c4c8b6966ba1ec4bd8576c8d1764f4e2d09cbc0 Mon Sep 17 00:00:00 2001 From: Jan-Tarek Butt Date: Wed, 25 Apr 2018 09:33:21 +0200 Subject: [PATCH] package/gluon-hoodselector: add default hood mode --- .../gluon-hoodselector/luasrc/usr/sbin/hoodselector | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector b/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector index fffa9db6..bf321966 100755 --- a/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector +++ b/package/gluon-hoodselector/luasrc/usr/sbin/hoodselector @@ -179,4 +179,12 @@ if hoodutil.batmanHasGateway() then 523 end --]] -exit(0) -- Debug +-- DEFAULT-HOOD MODE +-- If we do NOT have a VPN connection and no other freifunk mesh nodes found in our network ENV +-- then we set the default hood. +io.stdout:write("ENV does not give enough information\n") +if hoodutil.set_hoodconfig(defaultHood) then + hoodutil.restart_services() -- TMP solution + io.stdout:write('Hood set by default-hood mode.\n') +end +exit(0)