diff options
author | Manuel Munz <freifunk@somakoma.de> | 2011-11-10 13:44:22 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2011-11-10 13:44:22 +0000 |
commit | c67d7b2a435d392afacc49f7d9f3e08a240e98b2 (patch) | |
tree | 48e8db2ee22ab149d57c376cae81bfe53cbbecbf /modules | |
parent | 525da459d78596cfc8dce9ed2fc690fb395b5a55 (diff) |
admin-full: When creating the ntp timeserver section also add the default ntp servers
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_system/system.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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 2f2687d00..27f0225d4 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua @@ -157,7 +157,12 @@ if has_ntpd then -- timeserver setup was requested, create section and reload page if m:formvalue("cbid.system._timeserver._enable") then - m.uci:section("system", "timeserver", "ntp") + m.uci:section("system", "timeserver", "ntp", + { + server = { "0.openwrt.pool.ntp.org", "1.openwrt.pool.ntp.org", "2.openwrt.pool.ntp.org", "3.openwrt.pool.ntp.org" } + } + ) + m.uci:save("system") luci.http.redirect(luci.dispatcher.build_url("admin/system", arg[1])) return |