自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

arm上實現(xiàn)PPP撥號腳本

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
下面我們針對arm上實現(xiàn)PPP撥號腳本的內(nèi)容,進(jìn)行一下具體的介紹。針對它具體實現(xiàn)的代碼進(jìn)行了分析,希望對大家能夠有所幫助。

在之前的《Linux內(nèi)核PPP套件設(shè)置》一文中,我們已經(jīng)講解了相關(guān)的一些PPP套件設(shè)置操作。那么這里,我們依據(jù)前文的一些內(nèi)容,再來詳細(xì)講解一下arm上成功實現(xiàn)ppp撥號腳本的過程。

arm上成功實現(xiàn)ppp撥號腳本

ppp-on:

  1. #!/bin/sh  
  2. pppd modem -d -detach lock /dev/ttySAC0 19200 kdebug 4 file /etc/ppp/options crtscts noipdefault netmask 255.255.255.0 defaultroute connect /etc/ppp/chat-script 

ppp-off:

  1. #!/bin/sh  
  2. ######################################################################  
  3. #  
  4. # Determine the device to be terminated.  
  5. #  
  6. if [ "$1" = "" ]; then  
  7. DEVICE=ppp0 
  8. else  
  9. DEVICE=$1  
  10. fi  
  11.  
  12. ######################################################################  
  13. #  
  14. # If the ppp0 pid file is present then the program is running. Stop it.  
  15. if [ -r /var/run/$DEVICE.pid ]; then  
  16.         kill -INT `cat /var/run/$DEVICE.pid`  
  17. #  
  18. # If the kill did not work then there is no process running for this  
  19. # pid. It may also mean that the lock file will be left. You may wish  
  20. # to delete the lock file at the same time.  
  21.         if [ ! "$?" = "0" ]; then  
  22.                 rm -f /var/run/$DEVICE.pid  
  23.                 echo "ERROR: Removed stale pid file"  
  24.                 exit 1  
  25.         fi  
  26. #  
  27. # Success. Let pppd clean up its own junk.  
  28.         echo "PPP link to $DEVICE terminated."  
  29.         exit 0  
  30. fi  
  31. #  
  32. # The ppp process is not running for ppp0  
  33. echo "ERROR: PPP link is not active on $DEVICE"  
  34. exit 1 

chat-script:

  1. #!/bin/sh  
  2. exec chat -v \  
  3. TIMEOUT 5 \  
  4. ABORT   "BUSY" \  
  5. ABORT   "ERROR" \  
  6. ABORT   "NO CARRIER" \  
  7. '' \rAT   \  
  8. OK 'AT+CGDCONT=1,"IP","CMNET"' \  
  9. OK 'ATDT*99***1#' \  
  10. CONNECT '' \ 

設(shè)置DNS的resove.conf:

  1. nameserver 211.136.20.203  
  2. nameserver 211.136.17.107 

到此,arm ppp撥號腳本就設(shè)置好了。那么希望本文的代碼展示,能夠讓大家對此有所了解。

責(zé)任編輯:佟健 來源: hi.baidu.com
相關(guān)推薦

2010-09-06 11:07:07

pppdppp

2010-09-06 11:58:39

ppp撥號Linux

2010-09-03 10:42:02

ppp-on

2010-09-03 14:18:32

ppp腳本

2010-09-06 14:14:32

ppp-on

2010-09-03 11:33:55

PPPPPP-ON

2010-09-07 15:39:46

2009-08-17 17:08:35

C# ADSL自動撥號

2011-04-13 15:58:52

2010-08-05 10:24:35

路由器設(shè)置

2010-09-07 14:05:15

Arm移植pppoe

2011-08-24 10:31:01

網(wǎng)絡(luò)協(xié)議SLIPPPP

2010-09-06 10:56:54

2010-09-28 09:27:27

2009-12-28 11:04:29

ADSL撥號上網(wǎng)

2009-12-17 09:56:18

2010-09-09 17:27:43

PPP Multili

2010-09-28 13:53:52

2010-09-03 11:10:04

ppp authent

2010-09-06 12:37:11

pppLCP
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號