]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - share/examples/pppd/chat.sh.sample
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / share / examples / pppd / chat.sh.sample
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5 # Example for chat.sh file.
6
7 INIT='at&f'
8
9 dial(){
10         /usr/bin/chat -v                \
11                 ABORT   "ERROR"         \
12                 ABORT   "NO DIALTONE"   \
13                 TIMEOUT 5               \
14                 ""      "AT"            \
15                 "OK"    "${INIT}"       \
16                 "OK"-"+++"-""   "ATH"   \
17                 ABORT   "BUSY"          \
18                 ABORT   "NO ANSWER"     \
19                 ABORT   "NO CARRIER"    \
20                 "OK"    "ATDP$1"        \
21                 TIMEOUT 70              \
22                 "ogin:" "username"      \
23                 "word:" "pasword"       \
24                 TIMEOUT 50              \
25                 "PPP"   "\c"
26
27         [ $? -eq 0 ] && exit 0
28
29         echo "$1 failed" 1>&2
30         exit 1
31 }
32
33 dial 1234567