projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
FF-Wiazrd: Add OLSR DNS to dnsmasq
[project/luci.git]
/
applications
/
luci-ffwizard-leipzig
/
luasrc
/
model
/
cbi
/
ffwizard.lua
diff --git
a/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
b/applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
index 6373c7a8075f2d9010ecff568c65b4ad102db38c..8fad8e0c89d67213e87baaa4a1e085fdf4459346 100644
(file)
--- a/
applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
+++ b/
applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua
@@
-256,6
+256,12
@@
function olsr.write(self, section, value)
olsrbase.ignore = "0"
uci:section("olsrd", "Interface", nil, olsrbase)
uci:save("olsrd")
+
+ -- Import hosts
+ uci:foreach("dhcp", "dnsmasq", function(s)
+ uci:set("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr")
+ end)
+ uci:save("dhcp")
end