check_site.lua 441 B

1234567891011121314
  1. need_string(in_site('autoupdater.branch'))
  2. local function check_branch(k, _)
  3. assert_uci_name(k)
  4. local prefix = string.format('autoupdater.branches[%q].', k)
  5. need_string(in_site(prefix .. 'name'))
  6. need_string_array_match(prefix .. 'mirrors', '^http://')
  7. need_number(in_site(prefix .. 'good_signatures'))
  8. need_string_array_match(in_site(prefix .. 'pubkeys'), '^%x+$')
  9. end
  10. need_table('autoupdater.branches', check_branch)