add FCC restriction support

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2022-10-29 09:40:37 +02:00
parent a509308ae4
commit d40b4c676c
6 changed files with 60 additions and 7 deletions

View File

@@ -4,6 +4,8 @@ let uci = require("uci");
let ubus = require("ubus");
let capabfile = fs.open("/etc/ucentral/capabilities.json", "r");
let capab = json(capabfile.read("all"));
let restrictfile = fs.open("/etc/ucentral/restrictions.json", "r");
let restrict = restrictfile ? json(restrictfile.read("all")) : null;
let cmdfile = fs.open(ARGV[0], "r");
let cmd = json(cmdfile.read("all"));
let id = ARGV[1];
@@ -50,6 +52,7 @@ let scope = {
cursor: uci.cursor(),
ctx,
fs,
restrict,
/* log helper */
log,