applications/ffwizard: addnhosts for dnsmasq was not set properly when using 6and4...
authorManuel Munz <freifunk@somakoma.de>
Thu, 13 Jan 2011 13:15:31 +0000 (13:15 +0000)
committerManuel Munz <freifunk@somakoma.de>
Thu, 13 Jan 2011 13:15:31 +0000 (13:15 +0000)
applications/luci-ffwizard/luasrc/model/cbi/ffwizard.lua

index f963c16fdff853a39cf36f45e48ca367507e8f5e..d9d1c0ef9ff288033c6597c4f241e48229a9d899 100644 (file)
@@ -1357,17 +1357,16 @@ function main.write(self, section, value)
        uci:save("olsrd")
        uci:save("dhcp")
        -- Import hosts and set domain
-       uci:foreach("dhcp", "dnsmasq", function(s)
-               uci:set_list("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr")
-       end)
-
        if has_ipv6 then
                uci:foreach("dhcp", "dnsmasq", function(s)
-                       uci:set_list("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr.ipv6")
+                       uci:set_list("dhcp", s[".name"], "addnhosts", {"/var/etc/hosts.olsr","/var/etc/hosts.olsr.ipv6"})
                end)
+       else
+               uci:foreach("dhcp", "dnsmasq", function(s)
+                       uci:set_list("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr")
+               end)
        end
 
-
        uci:save("dhcp")
 
        -- Internet sharing