Sample PPP login.cmd - 6/30/96


My simple but working PacBell PPP login.cmd script:  all my notes 
begin with [*notes*].  Do not include these notes in your script.

#trace on
#
# set up some strings for dialling up
#
# Note: Trumpet 2.1x users can remove # from status commands
#
if ![load $number]
  if [query $number "Enter your dial up phone number"]
    save $number
  end
end
if ![load $username]
  if [username "Enter your login username"]
    save $username
  end
if ![load $password]
  if [password "Enter your login password"]
    save $password
  end
end
$modemsetup = "&f1"          [*You may need a different modem init string]
$prompt = "}"                [*This is the normal string {netcom.1}*]
$userprompt = "login:"       [*Changed from "sername:"]
$passprompt = "assword:"     [*Hmmm... This is right from Trumpet :)*]

%attempts = 10
#
#
#----------------------------------------------------------
#
# initialize modem
#

#status "Initializing Modem..."

output "atz"\13
if ! [input 10 OK\n]
  display "Modem is not responding"\n
# status "Modem is hosed! Please reset."
  abort
end
#
# setup our modem commands
#

#status "Setting Up Modem..."

output "at"$modemsetup\13
input 10 OK\n
#
# send phone number
#

#status "Dialling ISP..."

%n = 0
repeat
  if %n = %attempts
    display "Too many dial attempts"\n
#   status "Could not connect after 10 attempts!"
    abort
  end
  output "atdt"$number\13
  %ok = [input 60 CONNECT]
  %n = %n + 1
until %ok

#status "Connected to ISP."

input 10 \n
#
#  wait till it's safe to send because some modem's hang up
#  if you transmit during the connection phase
#
wait 30 dcd
#
# now prod the terminal server
#
output \13
#
#  wait for the username prompt
#

#status "Logging in to ISP..."

input 30 $userprompt
output $username\13
#
# and the password
#
input 30 $passprompt
output $password\13
#
# we are now logged in
#status "Login successful."
sleep 1
#status "Let's start PPP!"

input 30 "MTU is 1524."\n

# This should be whatever that last part of the PPP startup message.


[Setup Menu]-[Setup Menu Text]-[Troubleshooting Menu]-[Home Page]