qoriq: 02_network fix sweth globbing logic
authorThibaut VARÈNE <hacks@slashdirt.org>
Tue, 28 Jun 2022 14:40:05 +0000 (16:40 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Tue, 28 Jun 2022 21:09:53 +0000 (00:09 +0300)
This prevents invalid configuration of non-existent sweth devices.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
target/linux/qoriq/base-files/etc/board.d/02_network

index 35b7ce9f32160d0990f7c9bebf8ae3c10d915a35..355c8d37a4644f72737edc9b1d9757c3eaf7758f 100644 (file)
@@ -21,7 +21,7 @@ watchguard,firebox-m300)
 
        sweth_mac_offset=0x186d
 
-       for sweth in /sys/class/net/sweth*; do
+       for sweth in $(find /sys/class/net/ -name 'sweth*' -print); do
                device="$(basename "$sweth")"
                mac="$(mtd_get_mac_text wg_cfg0 "$sweth_mac_offset")"
                switchports="$switchports $device"