| Linux PPP HOWTO | ||
|---|---|---|
| 上一页 | 第 18 章. 自动化您的连接 - 创建连接脚本 | 下一页 |
如果您的 ISP 使用 PAP/CHAP,那么您的 chat 脚本会简单得多。 您的 chat 脚本只需要拨打电话,等待连接,然后让 pppd 处理登录!
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/sbin/chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \ |