home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / networking / amitcp / startnet.lzh / link next >
Encoding:
Text File  |  1994-06-25  |  2.0 KB  |  62 lines

  1. /*
  2.  * DEMON INTERNET Amiga Installation
  3.  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4.  *
  5.  * Link Control script:
  6.  *
  7.  *  NAME
  8.  *    link -- Control the state of the AmiTCP connection
  9.  *
  10.  *  USAGE
  11.  *    link up
  12.  *    link down
  13.  *
  14.  *  PURPOSE
  15.  *    This script makes using AmiTCP on a dialup to Demon much easier. You
  16.  *    can connect/disconnect by entering "link up" or "link down". I have
  17.  *    Alt-F6 set to issue "rx utils:link up" and Alt-F7 "rx utils:link down"
  18.  *    Important variables are stored below. This script is really only
  19.  *    useful when used with GWCSlip, which is what I recommend for all DIS
  20.  *    AmiTCP users.
  21.  *
  22.  *  NOTES
  23.  *   -I personally have AmiTCP running all the time (I moved most of the
  24.  *    startnet script to s:startup-sequence and modified it so that it
  25.  *    doesn't bring GWCSLIP up or try to grab the serial port). You could
  26.  *    easily bring AmiTCP up/test for it though I haven't bothered adding
  27.  *    such tests here... Testing for TCP: is an easy way to do this!
  28.  *
  29.  *   -When the link is dropped, the routes are also deleted; hopefully this
  30.  *    should make this script fairly well suited to the PPP device now
  31.  *    available for AmiTCP.
  32.  *
  33.  *   -No test
  34.  */
  35.  
  36.  
  37. /* VARIABLES - Modify these for your setup */
  38. myip = "158.152.16.231"            /* My IP number */
  39. mydev = "devs:networks/gwcslip.device"        /* Slip Device being used */
  40. mydevu = "0"                    /* Unit Number */
  41. myif = "cslip"||mydevu            /* Interface name (amitcp 3.0) */
  42. myhost = "158.152.1.65"            /* Gate */
  43.  
  44. /* THE SCRIPT PROPER */
  45.  
  46. address command
  47. arg which
  48.  
  49. if which="" then say "No command specified - try UP or DOWN"
  50. if which~="UP" & which~="DOWN" then say "Invalid command '" || which || "' - try UP or DOWN"
  51. else if which="UP" then do
  52.      "AmiTCP:bin/ifconfig" myif myip myhost "netmask 255.255.0.0"
  53.     "AmiTCP:bin/online" mydev mydevu
  54.     "AmiTCP:bin/route add default" myhost
  55. end
  56. else if which="DOWN" then do
  57.     "AmiTCP:bin/ifconfig" myif "down"
  58.     "AmiTCP:bin/offline" mydev mydevu
  59.     "AmiTCP:bin/route delete" myhost
  60.     "AmiTCP:bin/route delete default"
  61. end
  62.