From 2d3dcce53bd2650e7cf581b1592025ace62cedb8 Mon Sep 17 00:00:00 2001 From: Ing Date: Fri, 31 May 2024 03:01:21 +0800 Subject: [PATCH] fix _sort_netif check --- files/initrd/opt/rr/init.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/initrd/opt/rr/init.sh b/files/initrd/opt/rr/init.sh index a4c0d1e2..49aef808 100755 --- a/files/initrd/opt/rr/init.sh +++ b/files/initrd/opt/rr/init.sh @@ -77,8 +77,9 @@ if [ -f "${PART2_PATH}/GRUB_VER" ]; then fi if [ ! "LOCALBUILD" = "${LOADER_DISK}" ]; then - _sort_netif "$(readConfigKey "addons.sortnetif" "${USER_CONFIG_FILE}")" - + if arrayExistItem "sortnetif:" $(readConfigMap "addons" "${USER_CONFIG_FILE}"); then + _sort_netif "$(readConfigKey "addons.sortnetif" "${USER_CONFIG_FILE}")" + fi for ETH in ${ETHX}; do [ "${ETH::4}" = "wlan" ] && connectwlanif "${ETH}" && sleep 1 MACR="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g')"