From e0c0131505f1a0958ef78b4d3505d03105860304 Mon Sep 17 00:00:00 2001 From: Manuel Munz Date: Sun, 13 Feb 2011 22:06:41 +0000 Subject: [PATCH] luci:0.10: Merge r6883, r6884, r6889-r6891 --- .../luasrc/model/cbi/freifunk/ffwizard.lua | 9 ------- .../luasrc/model/cbi/admin_system/system.lua | 27 ++++++++++++++----- modules/freifunk/root/etc/config/freifunk | 3 --- modules/freifunk/root/usr/sbin/ff_rdate | 3 +-- 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/applications/luci-ffwizard/luasrc/model/cbi/freifunk/ffwizard.lua b/applications/luci-ffwizard/luasrc/model/cbi/freifunk/ffwizard.lua index 0094d0696..f915cfa9a 100644 --- a/applications/luci-ffwizard/luasrc/model/cbi/freifunk/ffwizard.lua +++ b/applications/luci-ffwizard/luasrc/model/cbi/freifunk/ffwizard.lua @@ -1045,15 +1045,6 @@ function main.write(self, section, value) uci:set("system", s['.name'], "zonename", "Europe/Berlin") uci:set("system", s['.name'], "timezone", 'CET-1CEST,M3.5.0,M10.5.0/3') end) - - -- Create time rdate_servers - local rdate = uci:get_all("freifunk", "time") - uci:delete_all("system", "time") - uci:section("system", "time", "rdate_servers", rdate) - rdate.server = rdate.rdate_servers - rdate.rdate_servers = "" - uci:delete_all("system", "rdate", nil) - uci:section("system", "rdate", nil, rdate) uci:save("system") -- Delete old watchdog settings diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua index 5b7da6716..646b14c5f 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua @@ -97,11 +97,26 @@ s:option(Value, "conloglevel", translate("Log output level")).optional = true s:option(Value, "cronloglevel", translate("Cron Log Level")).optional = true if has_rdate then - s2 = m:section(TypedSection, "rdate", translate("Time Server (rdate)")) - s2.anonymous = true - s2.addremove = false - - s2:option(DynamicList, "server", translate("Server")) + m3 = Map("timeserver", translate("Time Server (rdate)")) + s = m3:section(TypedSection, "timeserver") + s.anonymous = true + s.addremove = true + s.template = "cbi/tblsection" + + h = s:option(Value, "hostname", translate("Name")) + h.rmempty = true + h.datatype = host + i = s:option(ListValue, "interface", translate("Interface")) + i.rmempty = true + 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 -return m +return m, m3 diff --git a/modules/freifunk/root/etc/config/freifunk b/modules/freifunk/root/etc/config/freifunk index 8eb577fa9..b0009703f 100644 --- a/modules/freifunk/root/etc/config/freifunk +++ b/modules/freifunk/root/etc/config/freifunk @@ -82,9 +82,6 @@ config 'defaults' 'dhcp' config 'defaults' 'olsr_interface' option 'Ip4Broadcast' '255.255.255.255' -config 'defaults' 'time' - option 'rdate_servers' '128.138.140.44 171.64.7.77 171.64.7.99 81.169.154.44 130.133.1.10' - config 'defaults' 'upgrade' option 'repository' 'http://dev.luci.freifunk-halle.net/freifunk-snapshots' option 'rssfeed' 'http://firmware.leipzig.freifunk.net/kamikaze/.rss.xml' diff --git a/modules/freifunk/root/usr/sbin/ff_rdate b/modules/freifunk/root/usr/sbin/ff_rdate index 5a728f673..549293b75 100755 --- a/modules/freifunk/root/usr/sbin/ff_rdate +++ b/modules/freifunk/root/usr/sbin/ff_rdate @@ -6,8 +6,7 @@ uci_get_one() { done } -local servers=$(uci_get_one "network.wan.lease_timesrv" \ - "system.time.rdate_servers" "freifunk.time.rdate_servers") +local servers="$(uci_get_one 'network.wan.lease_timesrv') $(uci show timeserver |grep hostname |cut -d '=' -f 2 |tr '\n' ' ')" if [ -n "$servers" ]; then for server in $servers; do -- 2.25.1