mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Should fix retrieve IP for QMI proto
This commit is contained in:
parent
b7d380da31
commit
4cfc11147c
1 changed files with 6 additions and 0 deletions
|
@ -754,6 +754,12 @@ function interfaces_status()
|
||||||
connectivity = "ERROR"
|
connectivity = "ERROR"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if ipaddr == "" and ifname ~= nil then
|
||||||
|
ipaddr = ut.trim(sys.exec("ip -4 -br addr ls dev " .. ifname .. " | awk -F'[ /]+' '{print $3}' | tr -d '\n'"))
|
||||||
|
end
|
||||||
|
if ipaddr == "" and ifname ~= nil then
|
||||||
|
ipaddr = ut.trim(sys.exec("ip -4 addr show dev " .. ifname .. " | grep -m 1 inet | awk '{print $2}' | cut -d'/' -s -f1 | tr -d '\n'"))
|
||||||
|
end
|
||||||
if ipaddr == "" then
|
if ipaddr == "" then
|
||||||
connectivity = "ERROR"
|
connectivity = "ERROR"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue