diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-08 16:12:25 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-10 15:29:04 +0200 |
commit | 9cae3b9e67aef68cd579213bee1865ce1b815027 (patch) | |
tree | 902a1138bd8e783108656de279b5a082daa1ad5e /modules/luci-base/root/usr | |
parent | 5697ebbef575a182841cfff9e722b513f373ec6a (diff) |
protocols: replace luci/getTTYDevices calls with generic file/list ones
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/root/usr')
-rwxr-xr-x | modules/luci-base/root/usr/libexec/rpcd/luci | 34 | ||||
-rw-r--r-- | modules/luci-base/root/usr/share/rpcd/acl.d/luci-base.json | 2 |
2 files changed, 1 insertions, 35 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index ab6a7ecfee..b8243b8272 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -479,40 +479,6 @@ local methods = { end return { result = hostname:gsub("\n$", "") } end - }, - - getTTYDevices = { - args = { with_cdc = false, with_tts = true }, - call = function(args) - local fs = require "nixio.fs" - local iter = fs.glob("/dev/tty[A-Z]*") - local rv = {} - if iter then - local node - for node in iter do - rv[#rv+1] = node - end - end - if args.with_tts then - iter = fs.glob("/dev/tts/*") - if iter then - local node - for node in iter do - rv[#rv+1] = node - end - end - end - if args.with_cdc then - iter = fs.glob("/dev/cdc-wdm*") - if iter then - local node - for node in iter do - rv[#rv+1] = node - end - end - end - return { result = rv } - end } } 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 d05ba841e4..417296a394 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 @@ -27,7 +27,7 @@ "ubus": { "file": [ "list", "stat" ], "iwinfo": [ "assoclist", "freqlist", "txpowerlist", "countrylist" ], - "luci": [ "getBoardJSON", "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices", "getHostname", "getTTYDevices", "getWirelessDevices" ], + "luci": [ "getBoardJSON", "getDUIDHints", "getHostHints", "getIfaddrs", "getInitList", "getLocaltime", "getTimezones", "getDHCPLeases", "getLEDs", "getNetworkDevices", "getUSBDevices", "getHostname", "getWirelessDevices" ], "network.device": [ "status" ], "network.interface": [ "dump" ], "network": [ "get_proto_handlers" ], |