This is just a simple way to play with your ISP.


[test]
#!/usr/bin/perl
$PING = "/sbin/ping";
system($PING." -Qqc 5 yahoo.com"." > /dev/null 2>&1");
#change yahoo.com to your ISP gateway
if ($? == 0) {
  print "Link is UP\n"; }
else {
  print "Link is DOWN\n";  
 #DO WHAT EVER YOU WANT HERE
}
#------end test

Note: /var/run/tun0.pid is the pid for ppp program


I did not try this also. :D 
Play at your own risk.

   ||    || 
   ||    || 
   ||    || Sorry everyone, forgot to convert to txt before sending 
   ||    || this, so I'll resend
   ||    || 
   ||    || I'm having this huge problem:  I have adsl, and I connect 
   ||    || using that PPPoE garbage.  I also just changed ISP for a 
   ||    || less expensive one, and I'm beginning to realize why its 
   ||    || less expensive.  I'm running a machine with FreeBSD 4.7 
   ||    || stable on it and whenever it gets disconnected (about 
   ||    || twice daily, believe it or not) it can't seem to 
   ||    || "realize" that such is the case and thus never reconnects 
   ||    || to get a new IP.  Does anyone have any idea what I can do 
   ||    || to fix this?  Whenever I'm not around, and this happens, 
   ||    || I have to go out of my way to drive to where this box is 
   ||    || located to reboot it.  It's the only way I'm able to 
   ||    || force it to reconnect.
   ||    || 
   ||    || TIA
   ||    || 
   ||    || 
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to