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