repo.or.cz
/
dragonfly.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
More ids.
[dragonfly.git]
/
share
/
examples
/
pppd
/
chat.sh.sample
blob
92191c1851decd5c3473dbafedaa4cd79290f6aa
1
#!/bin/sh
2
#
3
# $FreeBSD: src/share/examples/pppd/chat.sh.sample,v 1.1.2.1 2002/02/12 00:49:12 cjc Exp $
4
# $DragonFly: src/share/examples/pppd/chat.sh.sample,v 1.2 2003/06/17 04:36:57 dillon Exp $
5
#
6
# Example for chat.sh file.
7
8
INIT
=
'at&f'
9
10
dial
(){
11
/
usr
/
bin
/
chat
-v
\
12
ABORT
"ERROR"
\
13
ABORT
"NO DIALTONE"
\
14
TIMEOUT
5
\
15
""
"AT"
\
16
"OK"
"
${INIT}
"
\
17
"OK"
-
"+++"
-
""
"ATH"
\
18
ABORT
"BUSY"
\
19
ABORT
"NO ANSWER"
\
20
ABORT
"NO CARRIER"
\
21
"OK"
"ATDP
$1
"
\
22
TIMEOUT
70
\
23
"ogin:"
"username"
\
24
"word:"
"pasword"
\
25
TIMEOUT
50
\
26
"PPP"
"\c"
27
28
[
$?
-eq
0
] &&
exit
0
29
30
echo
"
$1
failed"
1
>&
2
31
exit
1
32
}
33
34
dial
1234567