Пример скрипта для callback (cbcp callback ppp chat)
Ключевые слова: cbcp, callback, ppp, chat, (найти похожие документы)
Date: Tue, 01 Apr 2003 21:20:10 +0600
From: Alexander Ogol <[email protected]>
Newsgroups: ftn.ru.linux
Subject: Пример скрипта для callback
vs> Дайте шаблон сабж.
Что-то в таком духе:
/usr/sbin/ppp-mail:
--8<---------------cut here---------------start------------->8---
#!/bin/sh
pppd call alkarmail
sleep 3
pppd call alkarmailcb
--8<---------------cut here---------------end--------------->8---
/etc/ppp/peers/alkarmail:
--8<---------------cut here---------------start------------->8---
115200
debug
lock
callback 123456
crtscts
noauth
defaultroute
user _cg20862
/dev/ttyS1
pap-max-authreq 100
pap-restart 5
updetach
remotename "Alkar"
connect '/usr/sbin/chat -v -f /etc/ppp/chat-isp'
--8<---------------cut here---------------end--------------->8---
/etc/ppp/peers/alkarmailcb:
--8<---------------cut here---------------start------------->8---
115200
debug
crtscts
noauth
defaultroute
user _cg20862
remotename "Alkar"
/dev/ttyS1
lock
updetach
noproxyarp
lcp-echo-interval 60
receive-all
lcp-echo-failure 4
pap-max-authreq 100
pap-restart 5
escape FF
usepeerdns
connect '/usr/sbin/chat -v -f /etc/ppp/chat-callback -r /var/log/speed'
--8<---------------cut here---------------end--------------->8---
/etc/ppp/chat-isp:
--8<---------------cut here---------------start------------->8---
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
TIMEOUT 120
SAY "Timeout is 120 secs"
"" "at"
OK "atl1&d2&c1+MS=11,1,9600,19200"
OK "atdp399996"
"CONNECT"
--8<---------------cut here---------------end--------------->8---
/etc/ppp/chat-callback:
--8<---------------cut here---------------start------------->8---
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
ABORT "BUSY"
ABORT "Username/Password Incorrect"
REPORT CONNECT ABORT BUSY
TIMEOUT 120
SAY "Timeout is 120 secs"
"" "at"
OK "ATZ"
OK "AT+MS=11,1,9600,33600"
RING "ATA"
"CONNECT"
--8<---------------cut here---------------end--------------->8---
--
Sincerely yours, Alexander Ogol, happy GNU/Linux user.