home *** CD-ROM | disk | FTP | other *** search
- /*
- * DEMON INTERNET Amiga Installation
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *
- * Link Control script:
- *
- * NAME
- * link -- Control the state of the AmiTCP connection
- *
- * USAGE
- * link up
- * link down
- *
- * PURPOSE
- * This script makes using AmiTCP on a dialup to Demon much easier. You
- * can connect/disconnect by entering "link up" or "link down". I have
- * Alt-F6 set to issue "rx utils:link up" and Alt-F7 "rx utils:link down"
- * Important variables are stored below. This script is really only
- * useful when used with GWCSlip, which is what I recommend for all DIS
- * AmiTCP users.
- *
- * NOTES
- * -I personally have AmiTCP running all the time (I moved most of the
- * startnet script to s:startup-sequence and modified it so that it
- * doesn't bring GWCSLIP up or try to grab the serial port). You could
- * easily bring AmiTCP up/test for it though I haven't bothered adding
- * such tests here... Testing for TCP: is an easy way to do this!
- *
- * -When the link is dropped, the routes are also deleted; hopefully this
- * should make this script fairly well suited to the PPP device now
- * available for AmiTCP.
- *
- * -No test
- */
-
-
- /* VARIABLES - Modify these for your setup */
- myip = "158.152.16.231" /* My IP number */
- mydev = "devs:networks/gwcslip.device" /* Slip Device being used */
- mydevu = "0" /* Unit Number */
- myif = "cslip"||mydevu /* Interface name (amitcp 3.0) */
- myhost = "158.152.1.65" /* Gate */
-
- /* THE SCRIPT PROPER */
-
- address command
- arg which
-
- if which="" then say "No command specified - try UP or DOWN"
- if which~="UP" & which~="DOWN" then say "Invalid command '" || which || "' - try UP or DOWN"
- else if which="UP" then do
- "AmiTCP:bin/ifconfig" myif myip myhost "netmask 255.255.0.0"
- "AmiTCP:bin/online" mydev mydevu
- "AmiTCP:bin/route add default" myhost
- end
- else if which="DOWN" then do
- "AmiTCP:bin/ifconfig" myif "down"
- "AmiTCP:bin/offline" mydev mydevu
- "AmiTCP:bin/route delete" myhost
- "AmiTCP:bin/route delete default"
- end
-