FF-Wiazrd: Add OLSR DNS to dnsmasq
authorSteven Barth <steven@midlink.org>
Sun, 25 Jan 2009 17:14:45 +0000 (17:14 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 25 Jan 2009 17:14:45 +0000 (17:14 +0000)
applications/luci-ffwizard-leipzig/luasrc/model/cbi/ffwizard.lua

index 6373c7a..8fad8e0 100644 (file)
@@ -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