
893-741-B
A14-47
Configuring Hosts and Servers
begin_scriptchat2
sleep
3
send "Message
#1\n"
expect
"OK"
expect
"NOT OK", error
timeout 10
end_script
The following sample chat script can start a SLIP line on the Model 5390 CLI port. This script sends
the string slip with a carriage return. Then it waits five seconds for a case-sensitive match on the
string Switching to SLIP. If the match times out, the script will return as unsuccessful. If the
expect_case field receives the expected string, it returns successfully.
begin_scriptchat_slip
send
"slip\r"
expect_case"Switching to SLIP", success
timeout 5, error
end_script
The following sample script waits ten seconds for the string username: because this <default time-out
value> is specified in the begin_script statement. The <default time-out value> is used only if a
<time-out value> is omitted from the timeout statement. If a <default time-out value> is not specified
on this line, the default remains five seconds.
begin_scriptscript1, 10
send
"login"
expect
"username:"
timeout success
end_script
Summary of Contents for 5390
Page 28: ...893 741 B Figures xxviii ...
Page 44: ...893 741 B Preface xliv ...
Page 45: ......
Page 48: ......
Page 60: ...A1 12 893 741 B Introduction to the Model 5390 Server ...
Page 106: ...A3 18 893 741 B Configuring Ports ...
Page 142: ...A5 12 893 741 B Printers ...
Page 152: ...A6 10 893 741 B Modems ...
Page 168: ...A7 16 893 741 B Serial Line Internet Protocol SLIP ...
Page 224: ...A9 38 893 741 B Internetwork Packet Exchange IPX Protocol ...
Page 258: ...A11 12 893 741 B Dial up Networking ...
Page 289: ...893 741 B A12 31 Internet Protocol IP Routing that are possible ...
Page 506: ...A15 86 893 741 B Using Model 5390 Security ...
Page 507: ......
Page 544: ...B1 36 893 741 B Network Administration ...
Page 574: ...B2 30 893 741 B Simple Network Management Protocol SNMP ...
Page 575: ......
Page 606: ...C1 30 893 741 B na Commands ...
Page 676: ...C2 70 893 741 B Configuration Parameters ...
Page 772: ...C3 96 893 741 B Using the CLI Commands ...
Page 794: ...C5 12 893 741 B Network Protocols ...
Page 795: ......
Page 796: ... Appendix D1 Software Reference Part D Appendixes ...