diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-08-13 15:23:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-13 15:23:02 +0200 |
commit | 73f2c37a01df0568296d1ce3707cdf2f532a7127 (patch) | |
tree | 82d4b82a23e6bee18f0f339a9ba701531fd34082 /protocols | |
parent | 40b2d38ac4ea626845a7596b4e16c76dcbd0c15d (diff) | |
parent | 95c38dab8f4e97bf35ae07f5ab060eab1f23fe42 (diff) |
Merge pull request #1989 from hanipouspilot/ncm
luci-proto-ncm: suggest both tty and wdm devices
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua b/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua index b258dfc59..318db7e77 100644 --- a/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua +++ b/protocols/luci-proto-ncm/luasrc/model/cbi/admin_network/proto_ncm.lua @@ -19,16 +19,13 @@ local ipv6, delay, defaultroute, metric, peerdns, dns device = section:taboption("general", Value, "device", translate("Modem device")) device.rmempty = false -local device_suggestions = nixio.fs.glob("/dev/cdc-wdm*") - or nixio.fs.glob("/dev/ttyUSB*") - -if device_suggestions then - local node - for node in device_suggestions do - device:value(node) - end +local dev +for dev in nixio.fs.glob("/dev/ttyUSB*") do + device:value(dev) +end +for dev in nixio.fs.glob("/dev/cdc-wdm*") do + device:value(dev) end - mode = section:taboption("general", Value, "mode", translate("Service Type")) mode:value("", translate("Modem default")) |