Developing lightweight computation at the DSG edge

Commit 5bee2835 authored by p4u's avatar p4u
Browse files

Fixed and improved qmpinfo ipv4 function

parent 7c4ac546
......@@ -164,7 +164,7 @@ end
function qmpinfo.get_ipv4()
local ipv4 = {}
local ipv4_raw = util.exec("ip -4 a | grep inet | awk '{print $2}' | awk -F/ '{print $1}' | grep -v 127.0.0.1")
local ipv4_raw = util.exec("ip -4 a | grep inet | grep -v bmx6_ | awk '{print $2}'")
for _,v in ipairs(util.split(ipv4_raw)) do
if #util.trim(v) > 1 then
table.insert(ipv4,util.trim(v))
......@@ -244,3 +244,4 @@ function qmpinfo.get_key()
end
return qmpinfo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment