tree: bugfix III

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-07-04 20:12:29 +02:00
parent e186af796d
commit db6e493a2d
2 changed files with 8 additions and 8 deletions

View File

@ -226,8 +226,8 @@ function bootDSM () {
COUNT=0 COUNT=0
DRIVER=$(ls -ld /sys/class/net/${ETH}/device/driver 2>/dev/null | awk -F '/' '{print $NF}') DRIVER=$(ls -ld /sys/class/net/${ETH}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
while true; do while true; do
if ! ip link show ${ETH} 2>/dev/null | grep -q 'UP'; then if ethtool ${ETH} 2>/dev/null | grep 'Link detected' | grep -q 'no'; then
echo -e "\r\033[1;37m${DRIVER}:\033[0m DOWN" echo -e "\r\033[1;37m${DRIVER}:\033[0m NOT CONNECTED"
break break
fi fi
COUNT=$((${COUNT} + 1)) COUNT=$((${COUNT} + 1))
@ -242,8 +242,8 @@ function bootDSM () {
fi fi
break break
fi fi
if ethtool ${ETH} 2>/dev/null | grep 'Link detected' | grep -q 'no'; then if ! ip link show ${ETH} 2>/dev/null | grep -q 'UP'; then
echo -e "\r\033[1;37m${DRIVER}:\033[0m NOT CONNECTED" echo -e "\r\033[1;37m${DRIVER}:\033[0m DOWN"
break break
fi fi
if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then

View File

@ -173,8 +173,8 @@ for ETH in ${ETHX}; do
COUNT=0 COUNT=0
DRIVER=$(ls -ld /sys/class/net/${ETH}/device/driver 2>/dev/null | awk -F '/' '{print $NF}') DRIVER=$(ls -ld /sys/class/net/${ETH}/device/driver 2>/dev/null | awk -F '/' '{print $NF}')
while true; do while true; do
if ! ip link show ${ETH} 2>/dev/null | grep -q 'UP'; then if ethtool ${ETH} 2>/dev/null | grep 'Link detected' | grep -q 'no'; then
echo -e "\r\033[1;37m${DRIVER}:\033[0m DOWN" echo -e "\r\033[1;37m${DRIVER}:\033[0m NOT CONNECTED"
break break
fi fi
COUNT=$((${COUNT} + 1)) COUNT=$((${COUNT} + 1))
@ -188,8 +188,8 @@ for ETH in ${ETHX}; do
fi fi
break break
fi fi
if ethtool ${ETH} 2>/dev/null | grep 'Link detected' | grep -q 'no'; then if ! ip link show ${ETH} 2>/dev/null | grep -q 'UP'; then
echo -e "\r\033[1;37m${DRIVER}:\033[0m NOT CONNECTED" echo -e "\r\033[1;37m${DRIVER}:\033[0m DOWN"
break break
fi fi
if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then if [ ${COUNT} -ge ${BOOTIPWAIT} ]; then