home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / expect / scripts / slip.shar / README next >
Encoding:
Text File  |  1993-06-30  |  1.4 KB  |  39 lines

  1. These scripts might be useful for those of us whose slip links
  2. go down or get jammed with regularity. They use the "expect" scripting
  3. language which is based on TCL.
  4.  
  5. The script pings the remote side of your slip link and restarts it if there is
  6. no answer.
  7.  
  8. 1) Obviously the scripts would need to be customized for the /etc/hosts or
  9. ip number you use for your far end slip link.
  10.  
  11. 2) You need to change the remote slip links phone number.
  12.  
  13. 3) You may need to change the tip entry for the port you use for slip.
  14.  
  15. 4) Also some of the directories need to be altered. I rooted everything so as
  16. to not need an extensive path and to make the system a bit more secure.
  17.  
  18. 5) Lastly the modem dialog might be different in your system if you don't have a
  19. T2500.
  20.  
  21. I am using "gated" on my system that seems to need to be killed and restarted
  22. when a slip link goes down. If you are using another router alter that section
  23. or comment it out.
  24.  
  25. I'm pretty happy about the flexibility inherent in "expect". It can basically
  26. do anything I can do from a terminal with a little programming.
  27.  
  28. When you're done make the scripts executable, copy them into /usr/local/bin
  29. and create a crontab entry that looks like this:
  30.     5,35 *  * * * /usr/local/bin/slip-alive.exp
  31.  
  32.  
  33. This was tested on a Sun 3/60 with a T2500 running expect-3.24.0, slip-4.0 and
  34. gated-2.0.1.14.
  35.  
  36. This is in the public domain. Its too small to sweat it.
  37. --
  38. Edward Elhauge, ee@lever.com, Jun 1993
  39.