gluon/package/gluon-core/check_site.lua
Matthias Schiffer d5c334af6d gluon-core: replace opkg site configuration to make it more flexible
The new options allow specifying custom repositories and are evaluated
in an upgrade script, not during build.
2015-10-14 02:57:29 +02:00

24 lines
575 B
Lua

need_string 'site_code'
need_string 'site_name'
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
need_string('hostname_prefix', false)
need_string 'timezone'
need_string_array('ntp_servers', false)
need_string_match('prefix4', '^%d+.%d+.%d+.%d+/%d+$')
need_string_match('prefix6', '^[%x:]+/%d+$')