Well the network is up all the time in loopback mode (at least notmally, I don't if there is way to prevent that).
You might be able to query the routing lists via GetRouteInfo() to find out if the machine is on the LAN, (or perhaps some other API function I missed) , Ranger can show the configured interface so that may be possible, but I don't think you can work out if the router is then connected to the internet without at least pinging a remote address.
In my S:Network-Status, after the AddNetInterface line, I have the following:
Wait 5 SECS
GetNetStatus CHECK INTERFACES,RESOLVER,DEFAULTROUTE
If WARN
Wait 3 ; Increase chances of IPrefs having opened the final WB screen
RequestChoice "Network Startup" "Network not operational,*nS:Network-Startup aborted" "OK"
Quit
EndIf
It's probably not fully failsafe, but it usually does the trick for me.
Play around with the lengths of the Wait commands if needed.
why not just send a "ping" to a server you know and wait a little time for an answer ? if network is up you will get a ping back from the site, if network is down you will get an instant error.
Amigalement, Jean-Francois Bachelet, Amiga nuts since 1985 ----------------------------------------------------------- Welcome to Happy Computing : AMIGA! (C)2K4-2K99 voxel