# @(#) login.LAT V1.2 Tue Sep 1 13:25:28 1992
# xchat script for logging into a VMS system through a LAT
# terminal server port. If no VMS password parameter supplied,
# skips password phase of VMS login. If LAT-password supplied,
# will log into LAT server using that password. NOTE: does not
# handle the situation where a LAT password is needed but no
# VMS password is needed.
# xchat login.LAT sysname username [ password [ LAT-password ] ]
# rbd Fri Aug 14 13:37:06 1992
# Changes for Lantronix ETS-16. It says "type help at the Local>
# prompt..." then it gives the prompt for real! Prompt may need
# to be something other than "Local>". We match the real Local>
# prompt by matching the leading newline!
# rbd Tue Sep 1 13:04:32 1992
# Remove absolute path name from log file. Now defaults per config.
sleep 2000 # Wait 2 seconds
ifnstr svrstart 3 # Skip server password if not given
# Starting point if server password supplied. Handle situation
# where the server line may have been left waiting for username
count # Get server's password prompt
ifgtr deadmux 5 # die if 5 cr's don't do it
timeout l0 1000 # Wait and try again
# Send server's password. Fail if don't get Username
timeout badsvrpw 5000 # Die if invalid
# Starting point if NO server password supplied. Handle situation
# where the server line may have been left at local> prompt.
count # Get username> or local> prompt
ifgtr deadmux 5 # Die if 5 cr's don't do it
timeout l1 1000 # Wait and try again
# Server asked for a username. Just give 'uucp'.
# At this point, we have the Local> prompt. Send the connect
# command for the specified LAT host service name, and wait for
# VMS "Username:" prompt. Die after 10 seconds.
# Got VMS "Username:" prompt. Send the username. If a password
# was given, wait for the "Password:" prompt. Die after 10 seconds.
# if no password was given, we're done!
# Got VMS "Password:" prompt. Send the password and we're done!
# LAT server appears dead. Fail.
logerr No response from LAT server
# The server password was bad. Fail.
logerr Invalid LAT server password
# VMS system appears to be dead. Fail.
logerr No VMS Username: prompt
# Failed to get "Password:" prompt. Fail.
logerr No VMS Password: prompt. Invalid password?