;
; .kermtrc :	This file initializes Kermit and dials a number until
;               there is a connection. It then logs you on and starts
;               the term daemon on the remote host.
;
;
; Last modified: 05/01/95
;
; Author: David J. Lennox  < djlennox@mtu.edu >
;
;
; The routines below assume that you are connecting to a terminal
; server at the remote end and doing an rlogin to your host machine.
; There are many different setups for connecting. If you do not
; initially connect to a terminal server this script will not work
; as is. You will have to modify the ":LOGIN" subroutine to reflect
; the method your remote host uses for logins. The rest of this
; script however should work fine.
;
;
; Replace the values for MODEM, MODEM-DIALER, and LINE with your own.
; Replace the values for DIAL and INIT-STRING with your own.
;

SET MODEM hayes
SET MODEM-DIALER hayes
SET LINE /dev/cua2
SET SPEED 38400   
SET PARITY none   
SET DUPLEX full   
SET FLOW rts/cts  
SET FILE TYPE bin 
SET FILE NAME lit 
SET REC PACK 1000 
SET SEND PACK 1000
SET WINDOW 5
SET INPUT CASE ignore
SET INPUT TIMEOUT-ACTION proceed
SET OUTPUT PACING 10
SET PROMPT Termnet>  
SET DIAL DISPLAY on  
SET DIAL HANGUP on   
SET DIAL MODEM-HANGUP
SET DIAL SPEED-MATCHING off
SET DIAL TIMEOUT 45
SET DIAL INIT-STRING AT &F &C1 &D0 M0 \13

;
; Start the procedure.
;
; Replace "REMOTE-PHONE-NUMBER" with the phone number you call to connect.
; Do not include the Quotation marks.
;

:BEGIN
CLEAR 
DIAL "REMOTE-PHONE-NUMBER"  
INPUT 10 CONNECT     
IF FAILURE GOTO BEGIN
ELSE GOTO LOGIN

;
; If we connect then start the login.
;
; NOTE: Replace "YOUR-REMOTE-HOST" with the canonical name of your remote
;       host. For example:  pacemaker.mtu.edu   Do not include the quotation
;       marks.
;
;       Replace "YOUR-LOGIN-NAME" with the name you use to login on your
;       remote host. For example:  djlennox  Do not include the quotation
;       marks.
;
;       Replace "YOUR-PASSWORD" with the password you use on your remote
;       host. For example:  AjD04213  ( Not a chance :-) )  Do not include
;       the quotation marks.
;
;       The last OUTPUT line of this subroutine contains the command
;       "starterm". This is the command used to start term on the remote
;       machine. On the remote machine you must add an alias for this
;       command to your .profile ( if you are using a Bourne shell ) or
;       your .cshrc ( if you are using a C shell. ) This is done like so:
;
;             alias starterm='term -r'    for Bourne
;             alias starterm 'term -r'    for C
; 

:LOGIN
INPUT 10 :
IF FAILURE GOTO BEGIN
ELSE OUTPUT rlogin "YOUR-REMOTE-HOST"\13
INPUT 10 login:
IF FAILURE GOTO BEGIN
ELSE OUTPUT "YOUR-LOGIN-NAME"\13
INPUT 10 Password:
IF FAILURE GOTO BEGIN
ELSE OUTPUT "YOUR-PASSWORD"\13
INPUT 10 TERM = (vt100) 
IF FAILURE GOTO BEGIN   
ELSE OUTPUT \13
PAUSE 2
OUTPUT starterm\13
PAUSE 1
QUIT   

;
; If modem not working exit.
;

:END
ECHO Modem Initialization Failure...
ECHO Exiting Program...
QUIT


; Done!
