Fix bug where net widget would not get the device name

This happens because my output from ```ip link show``` doesn't have anything additional betweeen MULTICAST and UP.

```
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP>
```
This commit is contained in:
2009 2017-01-24 19:55:27 +10:00 committed by GitHub
parent 272844030a
commit 958cf60e6f
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ local function worker(args)
function net.get_device() function net.get_device()
helpers.async(string.format("ip link show", device_cmd), function(ws) helpers.async(string.format("ip link show", device_cmd), function(ws)
ws = ws:match("(%w+): <BROADCAST,MULTICAST,.-,UP,LOWER_UP>") ws = ws:match("(%w+): <BROADCAST,MULTICAST,.-UP,LOWER_UP>")
net.iface = ws and { ws } or {} net.iface = ws and { ws } or {}
end) end)
end end