netup
- connects to a host & port return status reflects
success or failure
netup
connects to a host & port number (defaults to
ECHO_PORT) with the TCP protocol. The hostname can either
be host.domain or a 4 octet IP address. If the port number
is the ECHO_PORT, then it tests the connection. returns 0
if the connection is up, else returns > 0 otherwise. This
is mostly useful for a SLIP/PPP connection to test whether
it's still up or not and to take corrective action if not.
The -v option causes some verbose output to stdout
Why is netup necessary? Because ping often does not
return a failure status on many systems if it fails to
establish a connection with a host, and thus making it almost
useless in a script ... unless extraneous measures &
overhead is used.