luci-base: migrate luci/getBoardJSON to C plugin
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
c882a053e7
commit
d21ebcfbbc
3 changed files with 3 additions and 9 deletions
|
@ -63,7 +63,7 @@ var callLuciIfaddrs = rpc.declare({
|
|||
});
|
||||
|
||||
var callLuciBoardJSON = rpc.declare({
|
||||
object: 'luci',
|
||||
object: 'luci-rpc',
|
||||
method: 'getBoardJSON'
|
||||
});
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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" ],
|
||||
|
|
Loading…
Reference in a new issue