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

View File

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