diff --git a/files/initrd/opt/arc/include/functions.sh b/files/initrd/opt/arc/include/functions.sh index 57b47fcb..09dd67be 100755 --- a/files/initrd/opt/arc/include/functions.sh +++ b/files/initrd/opt/arc/include/functions.sh @@ -229,14 +229,14 @@ function _sort_netif() { local ETHLIST="" local ETHX="$(ls /sys/class/net/ 2>/dev/null | grep eth)" # real network cards list for ETH in ${ETHX}; do - local MAC="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g' | tr '[:upper:]' '[:lower:]')" + local MAC="$(cat /sys/class/net/${ETH}/address 2>/dev/null | sed 's/://g; s/.*/\L&/')" local ETHBUS="$(ethtool -i ${ETH} 2>/dev/null | grep bus-info | cut -d' ' -f2)" ETHLIST="${ETHLIST}${ETHBUS} ${MAC} ${ETH}\n" done local ETHLISTTMPM="" local ETHLISTTMPB="$(echo -e "${ETHLIST}" | sort)" if [ -n "${1}" ]; then - local MACS="$(echo "${1}" | sed 's/://g' | tr '[:upper:]' '[:lower:]' | tr ',' ' ')" + local MACS="$(echo "${1}" | sed 's/://g; s/,/ /g; s/.*/\L&/')" for MACX in ${MACS}; do ETHLISTTMPM="${ETHLISTTMPM}$(echo -e "${ETHLISTTMPB}" | grep "${MACX}")\n" ETHLISTTMPB="$(echo -e "${ETHLISTTMPB}" | grep -v "${MACX}")\n"