Skip to content

Commit

Permalink
fixup! Add support for setting domain for the cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui committed Aug 8, 2016
1 parent 94c421c commit 4ca7359
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/lime-system/files/usr/lib/lua/lime/network.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ function network.setup_dns()
local cloudDomain = config.get("system", "domain")
local resolvers = config.get("network", "resolvers")

local function setup_dnsmasq(s)
uci:set("dhcp", s[".name"], "domain", cloudDomain)
uci:set("dhcp", s[".name"], "local", "/"..cloudDomain.."/")
uci:set("dhcp", s[".name"], "expandhosts", "1")
uci:set("dhcp", s[".name"], "domainneeded", "1")
uci:set("dhcp", s[".name"], "server", resolvers)
end

local uci = libuci:cursor()
uci:foreach("dhcp", "dnsmasq", setup_dnsmasq)
uci:foreach("dhcp", "dnsmasq",
function(s)
uci:set("dhcp", s[".name"], "domain", cloudDomain)
uci:set("dhcp", s[".name"], "local", "/"..cloudDomain.."/")
uci:set("dhcp", s[".name"], "expandhosts", "1")
uci:set("dhcp", s[".name"], "domainneeded", "1")
uci:set("dhcp", s[".name"], "server", resolvers)
end
)
uci:set("dhcp", "lan", "leasetime", "1h")
uci:save("dhcp")

Expand Down

0 comments on commit 4ca7359

Please sign in to comment.