From afeda4a3d37cf3f9a2001a67e24d0cdbbdbc4cde Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Mork?= Date: Mon, 29 Nov 2021 14:18:14 +0100 Subject: [PATCH] realtek: sort the port list numerically MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Mac adresses are assigned in the order given by the port list. The interfaces are also brought up in this order. This target supports devices with up to 52 ports. Sorting these alphabetically is very confusing, and assigning mac addresses in alphabetic order does not match stock firmware behaviour. Suggested-by: Sander Vanheule Signed-off-by: Bjørn Mork --- target/linux/realtek/base-files/etc/board.d/02_network | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 93d6d4bd1e7..e8e3f6035d5 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -17,10 +17,7 @@ ucidef_set_poe() { board=$(board_name) board_config_update -lan_list="" -for lan in /sys/class/net/lan*; do - lan_list="$lan_list $(basename $lan)" -done +lan_list=$(ls -1 -v -d /sys/class/net/lan* | xargs -n1 basename | xargs) ucidef_set_bridge_device switch ucidef_set_interface_lan "$lan_list" -- 2.30.2