saralogin
上传用户:tianjinjs
上传日期:2007-01-05
资源大小:309k
文件大小:1k
- # This script logs in to a dutch gateway called 'sara'
- # We want to go to the terminal server.
- #
- set a 0
- set b 0
- print "+++ Trying to login to the sara terminal server +++"
- loop1:
- # Wake up sara by sending a lot of 'ENTER's.
- inc a
- if a > 10 goto failed1
- send rr
- # When sara wakes up, it asks "DESTINATION?"
- expect {
- "DESTI"
- timeout 1 goto loop1
- }
- # We want destination 'terms'
- send terms
- set a 0
- loop2:
- # Wake up terminal server
- inc a
- if a > 10 goto failed2
- send rr
- # When terminal server is awake, it prompts with 'sara-vts1>'
- expect {
- "sara"
- timeout 1 goto loop2
- }
- exit
- failed1:
- print "nNo answer from gateway"
- exit
- failed2:
- print "nNo answer from terminal server"
- exit