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
Hi Jozsef, On Sat, Mar 27, 2010 at 12:07 PM, Jozsef Vadkan <jozsi.avadkan at gmail.com> wrote:> Why doesn't my "internet-connection" script work?I suggest you double-check the Advanced Bash Scripting Guide. You posted this to a couple of sites. In your if statements, you must do if `statement`; then foo; fi Don't forget to put ` around the statement you have there (ping something | grep something). -- Hakan (m1fcj) - http://www.hititgunesi.org
On 27 March 2010 12:07, Jozsef Vadkan <jozsi.avadkan at gmail.com> 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 >This is a ping script I use to check my boxes are all up an running each morning, change the IPs for a few hosts i.e. www.google.com, www.yahoo.com, www.youtube.com etc and hopefully that will help you. Also try not to post the same question to two mailing lists at the same time, I am having to cross post so that if my reply helps you, it gets archived on both lists ;) -- Regards, James. http://www.jamesbensley.co.cc/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100327/0b8fb347/attachment-0002.html>
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/AE9U1qdLDNS lookups take a long time to time out and fail. You could try a ping to your default gateway's IP address first. -- Les Mikesell lesmikesell at gmail.com