Explorar o código

realtek: sort the port list numerically

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 <[email protected]>
Signed-off-by: Bjørn Mork <[email protected]>
Bjørn Mork %!s(int64=4) %!d(string=hai) anos
pai
achega
afeda4a3d3
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      target/linux/realtek/base-files/etc/board.d/02_network

+ 1 - 4
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"