home *** CD-ROM | disk | FTP | other *** search
- #
- #
- # Internet-Connect (TM) SLIP/PPP Hangup Script Sample
- #
- # Each script line has the following general syntax
- # command arg1 arg2 ...
- # Null line or line started with # is ignored (comment line)
- # Number of arguments following each command depends on the command.
- # Valid commands are:
- # done -end script normally
- # fail -terminate script abnormally
- # goto label_name -jump to script line with label_name
- # label label_name -label a script line
- # raisedtr -raise DTR signal
- # dropdtr -drop DTR signal, e.g. to hangup manually
- # pause pause_in_secs -short wait
- # setcr [CarriageReturn_character] -default is \r
- # launch application_to_be_launched [goto_if_fail]
- # timeout default_timeout_in_secs
- # expect "expect_string" [timeout_in_secs [label_to_go_to_if_timeout]]
- # expectaddr [timeout_in_secs [label_to_go_to_if_timeout]]
- # send "send_string" -send a string to host (CR appended automatically)
- # sendpass "password" -send a password (will not write to log)
- # send $variable -prompt for variable string then send it to host
- # expect $variable [timeout_in_secs [label_to_go_if_timeout]]
- # where $variable:
- # $p (password, send only)
- # $l (local IP address, expect only)
- # $r (remote IP address, expect only)
- # $c (any command, e.g. start SLIP, send only)
- # $u (userid, send only)
- #
- # Text string must be in quotes if contains spaces, e.g
- # expect "Please enter user-id"
- #
- timeout 5
- # set CR to blank as we don't want \r appended to +++ string
- setcr ""
- send +++
- expect OK 5
- send "ATH0\r"
- # restore default CR character
- setcr
- done
-