"J.A. Magallon" <[EMAIL PROTECTED]> writes:

> New try (of course echo's should be killed for real initscripts):
>
> check_link_down ()
> {
>     if [ ! -x /sbin/mii-tool ]; then
>         return 0
>     fi
>
>     if [ -z "$(ip link show $1 up)" ]; then
>         echo "Link" $1 "is DOWN, rising..."
>         ip link set $1 up
>     fi
>
>     for (( try=0; try<10; try++ ))
>     do
>         output=`LC_ALL=C mii-tool $LINK $1 2>&1`
>         if echo $output | grep -vqs "no link"; then
>             echo "Link" $1 "is UP"
>             return 1
>         fi
>         sleep 1
>     done
>     echo "Failed to raise" $1 "after 10 seconds"
>     return 0
> }
>
> $LINK can be assigned in ifcfg-eth0, for example I have LINK="-F 10baseT-FD".
>
> Do not know if this matters for somebody, but the fact is that with default
> latest initscripts I thought my cablemodem was broken until I (sigh) booted
> windows on the laptop.

I have integrated this in the initscripts-6.87-2mdk, could you test ?

-- 
Warly

Reply via email to