modules/admin-full: Switch to the new rdate timeserver config in /etc/config/timeserver (#132)
This commit is contained in:
parent
094e2c8c81
commit
819fa18e16
1 changed files with 18 additions and 5 deletions
|
@ -184,11 +184,24 @@ end
|
||||||
--
|
--
|
||||||
|
|
||||||
if has_rdate then
|
if has_rdate then
|
||||||
s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)"))
|
m3= Map("timeserver", translate("Time Server (rdate)"))
|
||||||
s2.anonymous = true
|
s = m3:section(TypedSection, "timeserver")
|
||||||
s2.addremove = false
|
s.anonymous = true
|
||||||
|
s.addremove = true
|
||||||
|
s.template = "cbi/tblsection"
|
||||||
|
s.rmempty = true
|
||||||
|
|
||||||
s2:option(DynamicList, "server", translate("Server"))
|
s:option(Value, "hostname", translate("Name"))
|
||||||
|
i = s:option(ListValue, "interface", translate("Interface"))
|
||||||
|
i:value("", translate("Default"))
|
||||||
|
m3.uci:foreach("network", "interface",
|
||||||
|
function (section)
|
||||||
|
local ifc = section[".name"]
|
||||||
|
if ifc ~= "loopback" then
|
||||||
|
i:value(ifc)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -249,4 +262,4 @@ c.write = function(self, section, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
return m, m2
|
return m, m3, m2
|
||||||
|
|
Loading…
Reference in a new issue