#68 solution attempt

This commit is contained in:
luke bonham 2014-10-20 15:56:44 +02:00 committed by copycat-killer
parent e759a7fe23
commit 1a654b327d
1 changed files with 2 additions and 2 deletions

View File

@ -31,9 +31,9 @@ function net.get_device()
f = io.popen("ip link show | cut -d' ' -f2,9") f = io.popen("ip link show | cut -d' ' -f2,9")
ws = f:read("*a") ws = f:read("*a")
f:close() f:close()
ws = ws:match("%w+: UP") ws = ws:match("%w+: UP") or ws:match("ppp%w+: UNKNOWN")
if ws ~= nil then if ws ~= nil then
return ws:gsub(": UP", "") return ws:match("(%w+):")
else else
return "network off" return "network off"
end end