From: Thibaut VARÈNE Date: Tue, 28 Jun 2022 14:40:05 +0000 (+0200) Subject: qoriq: 02_network fix sweth globbing logic X-Git-Tag: v22.03.0-rc5~30 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fpepe2k.git;a=commitdiff_plain;h=c9448285f1c33cd5ee7669f88a6d9ecfc7c493ed qoriq: 02_network fix sweth globbing logic This prevents invalid configuration of non-existent sweth devices. Signed-off-by: Thibaut VARÈNE (cherry picked from commit 5fdbae463c57fa48709d876abaadbbbd5938f84f) --- diff --git a/target/linux/qoriq/base-files/etc/board.d/02_network b/target/linux/qoriq/base-files/etc/board.d/02_network index 35b7ce9f32..355c8d37a4 100644 --- a/target/linux/qoriq/base-files/etc/board.d/02_network +++ b/target/linux/qoriq/base-files/etc/board.d/02_network @@ -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"