mirror of https://github.com/lcpz/lain.git
#68 solution attempt
This commit is contained in:
parent
e759a7fe23
commit
1a654b327d
|
@ -31,9 +31,9 @@ function net.get_device()
|
|||
f = io.popen("ip link show | cut -d' ' -f2,9")
|
||||
ws = f:read("*a")
|
||||
f:close()
|
||||
ws = ws:match("%w+: UP")
|
||||
ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN")
|
||||
if ws ~= nil then
|
||||
return ws:gsub(": UP", "")
|
||||
return ws:match("(%w+):")
|
||||
else
|
||||
return "network off"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue