mirror of https://github.com/lcpz/lain.git
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:
parent
272844030a
commit
958cf60e6f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue