ppp-on的腳本分析
在不少編制中,我們都會(huì)見到ppp-on腳本的內(nèi)容。那么這里我們就主要講解一下這方面的知識(shí)吧。前面我們有文章提及過內(nèi)核PPP的編制,也講解過Linux下PPP的設(shè)置內(nèi)容。那么這里我們則補(bǔ)充一下ppp-on腳本內(nèi)容。那么不多說,具體代碼如下:
=================================================================
#ppp-on 腳本
#!/bin/sh
TELEPHONE=*99***1#
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
exec /bin/pppd debug lock modem nocrtscts /dev/ttyS1 9600 \
asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
=================================================================
#ppp-on-dialer
#!/bin/sh
exec /bin/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*99***1# \
CONNECT '' \
================================================================
# options
/dev/ttyS1
9600
debug
kdebug 7
nocrtscts
modem
auth
-chap
noipdefault
defaultroute
user john_doe
lock
================================================================
#pap-secrets
# Secrets for authentication using PAP
# client server secret IP addresses
john_doe * "" *
================================================================
#chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
================================================================