Checking if the network is up
Luis Francisco Gonzalez:
> Is there any way of checking whether the network is responding so
> that I only run popclient when it is?
That usually depends on what exactly you mean by "the network".
If you're using diald or some such, take a look at the result of
`route`.
If the network is always "logically up" on your machine, but
frequently not "physically up" you'll need to probe for a response
from some remote system. Take a look at the man page for ping and
read about the -c and -n options. You'll need to run grep on the
result because the presence or absence of a remote host won't affect
ping's return code.
--
Raul
Reply to: