diff --git a/files/initrd/opt/arc/arc.sh b/files/initrd/opt/arc/arc.sh index 76cfbffe..a431ad0b 100755 --- a/files/initrd/opt/arc/arc.sh +++ b/files/initrd/opt/arc/arc.sh @@ -1772,7 +1772,7 @@ function sysinfo() { VENDOR="$(dmidecode -s system-product-name)" BOARD="$(dmidecode -s baseboard-product-name)" ETHX=$(ls /sys/class/net/ | grep -v lo || true) - NIC="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")" + ETH="$(readConfigKey "device.nic" "${USER_CONFIG_FILE}")" CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")" BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")" if [ "${CONFDONE}" = "true" ]; then @@ -1812,7 +1812,7 @@ function sysinfo() { TEXT+="\n CPU: \Zb${CPUINFO}\Zn" TEXT+="\n Memory: \Zb$((${RAMTOTAL} / 1024))GB\Zn" TEXT+="\n" - TEXT+="\n\Z4> Network: ${NIC} NIC\Zn" + TEXT+="\n\Z4> Network: ${ETH} NIC\Zn" for N in ${ETHX}; do DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}') MAC="$(cat /sys/class/net/${N}/address | sed 's/://g')" diff --git a/files/initrd/opt/arc/boot.sh b/files/initrd/opt/arc/boot.sh index d880ed0c..d8b5734d 100755 --- a/files/initrd/opt/arc/boot.sh +++ b/files/initrd/opt/arc/boot.sh @@ -170,10 +170,10 @@ elif [[ "${DIRECTBOOT}" = "true" && ${BOOTCOUNT} -eq 0 ]]; then exec reboot elif [ "${DIRECTBOOT}" = "false" ]; then ETHX=$(ls /sys/class/net/ | grep -v lo || true) - NIC=$(ls /sys/class/net/ | grep eth | wc -l) + ETH=$(ls /sys/class/net/ | grep eth | wc -l) STATICIP="$(readConfigKey "arc.staticip" "${USER_CONFIG_FILE}")" BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")" - echo -e "\033[1;34mDetected ${NIC} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m" + echo -e "\033[1;34mDetected ${ETH} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m" for N in ${ETHX}; do IP="" DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}') diff --git a/files/initrd/opt/arc/init.sh b/files/initrd/opt/arc/init.sh index 19970d90..58657623 100755 --- a/files/initrd/opt/arc/init.sh +++ b/files/initrd/opt/arc/init.sh @@ -59,7 +59,7 @@ initConfigKey "device" "{}" "${USER_CONFIG_FILE}" # Init Network ETHX=$(ls /sys/class/net/ | grep -v lo || true) -NIC=$(ls /sys/class/net/ | grep eth | wc -l) +ETH=$(ls /sys/class/net/ | grep eth | wc -l) # No network devices [ $(echo ${ETHX} | wc -w) -le 0 ] && die "No NIC found! - Loader does not work without Network connection." MACSYS="$(readConfigKey "arc.macsys" "${USER_CONFIG_FILE}")" @@ -129,7 +129,7 @@ BOOTCOUNT="$(readConfigKey "arc.bootcount" "${USER_CONFIG_FILE}")" STATICIP="$(readConfigKey "arc.staticip" "${USER_CONFIG_FILE}")" BOOTIPWAIT="$(readConfigKey "arc.bootipwait" "${USER_CONFIG_FILE}")" [ -z "${BOOTIPWAIT}" ] && BOOTIPWAIT=20 -echo -e "\033[1;34mDetected ${NIC} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m" +echo -e "\033[1;34mDetected ${ETH} NIC.\033[0m \033[1;37mWaiting for Connection:\033[0m" for N in ${ETHX}; do IP="" DRIVER=$(ls -ld /sys/class/net/${N}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')