Re: [expert] Detecting an Active Network Interface

2002-08-21 Thread Mark Weaver
Todd Lyons wrote: Mark Weaver wrote on Tue, Aug 20, 2002 at 11:04:16PM -0400 : So (thinking on paper), something like: snip if count = maxtries (wow, do I forget valid syntax ;-) ) then wait 30 (??) (give the modem a chance to connect)

Re: [expert] Detecting an Active Network Interface

2002-08-21 Thread Brandon Long
I use something similiar to this script to check connectivity across my network. With a mysql backend it has become a very useful tool. Only problem is when you try to ping firewalled hosts. If you are on the same lan segment arping can be very useful because it works on the mac layer instead

Re: [expert] Detecting an Active Network Interface

2002-08-21 Thread Ronald J. Hall
On Tuesday 20 August 2002 11:04 pm, you wrote: Randy, it is written: thou shalt NOT use a GOTO...ever! ;) The force fed us that in assembler and COBOL classes till I thought it was gonna come outa my ears. and especially with the label: HELL !!! grinning from ear to ear --

Re: [expert] Detecting an Active Network Interface

2002-08-20 Thread Mark Weaver
Randy Kramer wrote: daRcmaTTeR wrote: What if you just did something like this. 1) ping ISP... a) if icmp echo request == 'yes' then do the mail thing else run ifup command kick mailque fi what-cha

Re: [expert] Detecting an Active Network Interface

2002-08-20 Thread Mark Weaver
Randy Kramer wrote: kwan, Thanks! I've got several choices now ;-) Randy Kramer [EMAIL PROTECTED] wrote: Here's a script that I use to check connectivity: #!/bin/bash STATUS=`ping -c 2 -q 11.22.33.44 2/dev/null` CODE=$? if [ $CODE -gt 0 ]; then echo Link is down.

Re: [expert] Detecting an Active Network Interface

2002-08-20 Thread Todd Lyons
Mark Weaver wrote on Tue, Aug 20, 2002 at 11:04:16PM -0400 : So (thinking on paper), something like: snip if count = maxtries (wow, do I forget valid syntax ;-) ) then wait 30 (??) (give the modem a chance to connect)

Re: [expert] Detecting an Active Network Interface

2002-08-20 Thread J. Craig Woods
Todd Lyons wrote: Mark Weaver wrote on Tue, Aug 20, 2002 at 11:04:16PM -0400 : So (thinking on paper), something like: snip if count = maxtries (wow, do I forget valid syntax ;-) ) then wait 30 (??) (give the modem a chance to

[expert] Detecting an Active Network Interface

2002-08-15 Thread Randy Kramer
I'm getting close on my email server (using fetchmail, postfix, procmail, ipopd (and maybe later imapd) -- in fact, if you see this it came from my Windows box via the Linux email server. ;-) But, I have some bugs to work out yet, and some questions: Questions: 1. Anybody know a good way to

Re: [expert] Detecting an Active Network Interface

2002-08-15 Thread daRcmaTTeR
On Thu, 15 Aug 2002, Randy Kramer wrote: I'm getting close on my email server (using fetchmail, postfix, procmail, ipopd (and maybe later imapd) -- in fact, if you see this it came from my Windows box via the Linux email server. ;-) But, I have some bugs to work out yet, and some

Re: [expert] Detecting an Active Network Interface

2002-08-15 Thread kwan
On Thu, 15 Aug 2002, Randy Kramer wrote: I'm getting close on my email server (using fetchmail, postfix, procmail, ipopd (and maybe later imapd) -- in fact, if you see this it came from my Windows box via the Linux email server. ;-) But, I have some bugs to work out yet, and some

Re: [expert] Detecting an Active Network Interface

2002-08-15 Thread Randy Kramer
daRcmaTTeR wrote: What if you just did something like this. 1) ping ISP... a) if icmp echo request == 'yes' then do the mail thing else run ifup command kick mailque fi what-cha think?

Re: [expert] Detecting an Active Network Interface

2002-08-15 Thread Randy Kramer
kwan, Thanks! I've got several choices now ;-) Randy Kramer [EMAIL PROTECTED] wrote: Here's a script that I use to check connectivity: #!/bin/bash STATUS=`ping -c 2 -q 11.22.33.44 2/dev/null` CODE=$? if [ $CODE -gt 0 ]; then echo Link is down. else echo Link