Re: "internet connection tester script"

2010-03-27 Thread James
FWIW, here's what I use. Requires net/fping. #!/bin/sh target=ip.address.of.next.hop.out echo "- Started at `date`" is_dead=0 while true; do fping -q $target fping_rc=$? if [ $is_dead -eq 0 -a $fping_rc -gt 0 ]; then echo "! Failure at `date`"

Re: "internet connection tester script"

2010-03-27 Thread Kevin Kinsey
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 As someone has noted, you're waiting on ping to timeout a bunch of times. And really, I'm not sure why this s

Re: "internet connection tester script"

2010-03-27 Thread Samuel Martín Moro
I prefer to use `host' command ping take time to run, especially when it do not respond... here's my script r...@omega ~ : cat /usr/local/bin/check_connectivity 13:43 #!/bin/sh # checks local and internet connectivity # faust - 2010/02/17 host google.com >/dev/null if [ $? -eq 0 ]; then ne

Re: "internet connection tester script"

2010-03-27 Thread Polytropon
On Sat, 27 Mar 2010 13:07:14 +0100, Jozsef Vadkan wrote: > Why doesn't my "internet-connection" script work? > > When I plug the ethcable out, it just waits...and waits...and waits... It doesn't even work correctly: Now as I definitely have Internet connection, it prints "NO INTERNET CONNECTION

"internet connection tester script"

2010-03-27 Thread Jozsef Vadkan
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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/f