Nothing much for OP... in message <[EMAIL PROTECTED]>, wrote Giorgos Keramidas thusly... > > On 2004-11-04 09:26, "Daan Vreeken [PA4DAN]" <[EMAIL PROTECTED]> wrote: > > On Thursday 04 November 2004 08:42, faisal gillani wrote: > > > > > > well i want to make a simple/wieard shell script :) which > > > checks somehow connection with the internet & rename some file > > > files if it finds connectivity with the internet , & do > > > nothing of it dont find connectivity with the internet ...is > > > it possible with simple shell script ? or do i have to learn > > > some scripting language for that ?
In the long range, learning will be better. > > #!/bin/sh > > > > connection=0 > > ping -c 5 -t 6 some.host.on.the.internet && connection=1 > > Ping may be a bit unreliable at times. If you know the interface > name you can probably get away by using ifconfig to short-cut > through the checks. Problem w/ not actually testing a connection is that there may be an address assigned to the interface (and it would be up) but lacking a meaningful connection, say, courtesy of firewall/dhcp running order/configuration. Well that was my problem w/ ipf & dhcp involving a NIC anyway. - Parv -- _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
