summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-10-31 14:15:40 +0100
committerJo-Philipp Wich <jo@mein.io>2019-11-01 12:03:33 +0100
commitd21ebcfbbc13ee8f979d8dbffeca1c9f1a7926a3 (patch)
tree47c1cb4e04ade5b48c69037f5a97a5a5e99f14c3 /modules
parentc882a053e70b6f7061e64def1d8342e72b79854a (diff)
luci-base: migrate luci/getBoardJSON to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/network.js2
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci7
-rw-r--r--modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json3
3 files changed, 3 insertions, 9 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js
index 5fa6167b27..665024fd7e 100644
--- a/modules/luci-base/htdocs/luci-static/resources/network.js
+++ b/modules/luci-base/htdocs/luci-static/resources/network.js
@@ -63,7 +63,7 @@ var callLuciIfaddrs = rpc.declare({
});
var callLuciBoardJSON = rpc.declare({
- object: 'luci',
+ object: 'luci-rpc',
method: 'getBoardJSON'
});
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index ace0957f3e..1e95ff5c68 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -334,13 +334,6 @@ local methods = {
end
},
- getBoardJSON = {
- call = function(args)
- local jsc = require "luci.jsonc"
- return jsc.parse(fs.readfile("/etc/board.json") or "")
- end
- },
-
getConntrackHelpers = {
call = function()
local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r")
diff --git a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json
index b3c4013782..158e72cf76 100644
--- a/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json
+++ b/modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json
@@ -41,7 +41,8 @@
"ubus": {
"file": [ "list", "read", "stat" ],
"iwinfo": [ "assoclist", "freqlist", "txpowerlist", "countrylist" ],
- "luci": [ "getBoardJSON", "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ],
+ "luci": [ "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices", "getWirelessDevices", "getSwconfigFeatures", "getSwconfigPortState", "getBlockDevices", "getMountPoints" ],
+ "luci-rpc": [ "getBoardJSON" ],
"network.device": [ "status" ],
"network.interface": [ "dump" ],
"network": [ "get_proto_handlers" ],