diff --git a/files/usr/lib/lua/aredn/services.lua b/files/usr/lib/lua/aredn/services.lua index af12d0d8..ba2075e9 100755 --- a/files/usr/lib/lua/aredn/services.lua +++ b/files/usr/lib/lua/aredn/services.lua @@ -164,7 +164,7 @@ local function get(validate) if link == "0" then port = "0" end - services[#services + 1] = string.format("%s://%s:%s/%s|tcp|%s\n", proto, host, port, sffx, name) + services[#services + 1] = string.format("%s://%s:%s/%s|tcp|%s", proto, host, port, sffx, name) end end end diff --git a/files/usr/local/bin/node-setup b/files/usr/local/bin/node-setup index e7037a28..673473cd 100755 --- a/files/usr/local/bin/node-setup +++ b/files/usr/local/bin/node-setup @@ -928,7 +928,7 @@ if nixio.fs.access("/etc/config.mesh/olsrd", "r") then for _, host in ipairs(hosts) do if host.host ~= "" then - of:write("\toption " .. host.ip:gsub("%.", "_") .. " '" .. host.host .. "'\n") + of:write("\tlist hosts '" .. host.ip .. " " .. host.host .. "'\n") end end for _, service in ipairs(services) @@ -971,7 +971,7 @@ if nixio.fs.access("/etc/config.mesh/olsrd", "r") then if nixio.fs.stat("/etc/config.mesh/xlink") then uci.cursor("/etc/config.mesh"):foreach("xlink", "interface", function(section) - of:write("config Interface\n\t list interface '" .. section.ifname .. "'\n") + of:write("\nconfig Interface\n\tlist interface '" .. section[".name"] .. "'\n") if section.peer then of:write("\toption Ip4Broadcast '" .. section.peer .. "'\n") else @@ -982,7 +982,7 @@ if nixio.fs.access("/etc/config.mesh/olsrd", "r") then if weight > 1 then of:write("\toption LinkQualityMult 'default " .. (1 / weight) .. "'\n") elseif weight < 1 then - of:write([[ Mode "ether"]]) + of:write("\toption Mode 'ether'\n") end else of:write("\toption Mode 'ether'\n")