Skip to content

Commit

Permalink
network._get_lower do not cause ls error when there is no lower
Browse files Browse the repository at this point in the history
  • Loading branch information
ilario committed Nov 23, 2024
1 parent 35471b0 commit 0227ffd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lime-system/files/usr/lib/lua/lime/network.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function network.clean()
end

function network._get_lower(dev)
local lower_if_path = utils.unsafe_shell("ls -d /sys/class/net/" .. dev .. "/lower*")
local lower_if_path = utils.unsafe_shell("ls /sys/class/net/" .. dev .. "/ | grep ^lower")
local lower_if_table = utils.split(lower_if_path, "_")
local lower_if = lower_if_table[#lower_if_table]
return lower_if and lower_if:gsub("\n", "")
Expand Down

0 comments on commit 0227ffd

Please sign in to comment.