On 2010-03-27 07:07, Jozsef Vadkan wrote:
Why doesn't my "internet-connection" script work?

When I plug the ethcable out, it just waits...and waits...and waits...

The script: http://pastebin.com/AE9U1qdL


What happens when you pull the cable and then manually run:

    ping -W 1 -c 4 bix.hu
    echo $?

    ping -W 1 -c 4 bix.hu | grep -q "4 received"
    echo $?

    ping -W 1 -c 4 www.yahoo.com | grep -q "4 received"
    echo $?

Also, I'd add "-q" to the ping, and think about just checking it's $? instead of grepping for "4 received".

--
"History does not long entrust the care of freedom to the weak
or the timid."  Dwight Eisenhower


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4badfe87....@cox.net

Reply via email to