mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Check if we have a return from mmcli -L before using it in Wizard
This commit is contained in:
parent
3a7669aef0
commit
1e705d2cb5
1 changed files with 8 additions and 6 deletions
|
@ -46,6 +46,7 @@
|
|||
|
||||
alltty = {}
|
||||
iftty = luci.sys.exec("timeout 1 /usr/bin/mmcli -L")
|
||||
if iftty ~= nil then
|
||||
for listtty in iftty:gmatch("([^\r\n]*)[\r\n]") do
|
||||
modemid = luci.util.trim(luci.sys.exec("echo '" .. listtty .. "' | awk -F' ' '{print $1}' | awk -F/ '{print $6}'"))
|
||||
if modemid ~= '' then
|
||||
|
@ -54,6 +55,7 @@
|
|||
table.insert(alltty, tty)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue