2014-07-05 00:48:56 +00:00
|
|
|
need_string 'site_code'
|
|
|
|
need_string 'site_name'
|
|
|
|
|
2015-10-14 00:55:13 +00:00
|
|
|
if need_table('opkg', nil, false) then
|
|
|
|
need_string('opkg.openwrt', false)
|
|
|
|
|
|
|
|
function check_repo(k, _)
|
|
|
|
-- this is not actually a uci name, but using the same naming rules here is fine
|
|
|
|
assert_uci_name(k)
|
|
|
|
|
|
|
|
need_string(string.format('opkg.extra[%q]', k))
|
|
|
|
end
|
|
|
|
|
|
|
|
need_table('opkg.extra', check_repo, false)
|
|
|
|
end
|
|
|
|
|
2015-03-21 12:21:49 +00:00
|
|
|
need_string('hostname_prefix', false)
|
2014-07-05 00:48:56 +00:00
|
|
|
need_string 'timezone'
|
|
|
|
|
|
|
|
need_string_array('ntp_servers', false)
|
|
|
|
|
|
|
|
need_string_match('prefix4', '^%d+.%d+.%d+.%d+/%d+$')
|
|
|
|
need_string_match('prefix6', '^[%x:]+/%d+$')
|
2015-10-26 19:59:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
for _, config in ipairs({'wifi24', 'wifi5'}) do
|
|
|
|
if need_table(config, nil, false) then
|
|
|
|
need_string('regdom') -- regdom is only required when wifi24 or wifi5 is configured
|
|
|
|
|
|
|
|
need_number(config .. '.channel')
|
|
|
|
end
|
|
|
|
end
|