Skip to content

Commit

Permalink
Merge pull request #1145 from ilario/_get_lower
Browse files Browse the repository at this point in the history
network._get_lower do not cause "ls" error when there is no lower
  • Loading branch information
G10h4ck authored Dec 27, 2024
2 parents 477ee4b + 0227ffd commit 6f307bb
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 6f307bb

Please sign in to comment.