From 0227ffd0a48ee9a9b50ac8fc10cd2b6632558801 Mon Sep 17 00:00:00 2001 From: Ilario Gelmetti Date: Sat, 23 Nov 2024 15:24:41 +0100 Subject: [PATCH] network._get_lower do not cause ls error when there is no lower --- packages/lime-system/files/usr/lib/lua/lime/network.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lime-system/files/usr/lib/lua/lime/network.lua b/packages/lime-system/files/usr/lib/lua/lime/network.lua index ba5b89b76..bcdaf8f03 100644 --- a/packages/lime-system/files/usr/lib/lua/lime/network.lua +++ b/packages/lime-system/files/usr/lib/lua/lime/network.lua @@ -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", "")