--帳號停用中-- | 【轉貼】ZyXEL-630-11-HowTo the "amioctl 1" usage to the start of the script #!/bin/bash TEXTDOMAIN=`basename $0` #if [ -d "./locale" ]; then # TEXTDOMAINDIR="./locale" #fi . /etc/amedyn # For PPPoE echo $">>> Setting PPPoE <<<" echo if [ "$ATM_PATH" = "" ]; then if [ -x /usr/local/sbin/br2684ctl ]; then ATM_PATH=/usr/local/sbin else if [ -x /usr/sbin/br2684ctl ]; then ATM_PATH=/usr/sbin fi fi fi # Now, we can send & receive data echo $">>> Activating send/receive data..." amioctl 1 || exit 1 sleep 3s echo # Load br2684 kernel module brmod=`lsmod | cut -d' ' -f1 | grep -q -E "^br2684$"` if [ "$brmod" = "" ]; then echo $">>> Loading br2684 kernel module..." # No exit if error, module can be inserted in kernel modprobe br2684 echo fi echo $">>> Loading ppp_generic..." # No exit if error, module can be inserted in kernel modprobe ppp_generic echo PPPOE=`which pppoe 2>/dev/null` if [ "$PPPOE" = "" ]; then echo $">>> Loading pppoe..." modprobe pppoe || exit 1 echo fi # Load ATM daemon pid=`pidof br2684ctl` if [ "$pid" = "" ]; then echo $">>> Loading br2684ctl..." $ATM_PATH/br2684ctl -b -c 0 -a 0.$VPI.$VCI || exit 1 sleep 3s echo fi # Activate interface echo $">>> Activating interface..." ifconfig nas0 up || exit 1 sleep 3s # Remove default Route if route -n | cut -d' ' -f1 | grep -q "0.0.0.0"; then echo $">>> Removing default route..." route del default || exit 1 echo fi echo $">>> Loading pppd daemon..." if [ "$PPPOE" = "" ]; then pppd || exit 1 else if [ -x /usr/bin/pon ]; then pon dsl-provider || exit 1 else adsl-start || exit 1 fi fi echo echo $0 $"successful" #---end of script--- Compile everything and install > cd /usr/amedyn > make Now we should have compiled cleanly and this will have created and installed our scripts and support programs and installed our amedyn module in the usual place. |
回覆 |
|
![]() | ||||
主題 | 主題作者 | 討論版 | 回覆 | 最後發表 |
2008 十一月份的 SA@Taipei - RRDTOOL HOWTO | threesecond | -- 閒 話 家 常 灌 水 版 | 0 | 2008-11-06 06:18 PM |
HOWTO setup a home-server(gentoo) | repsol | -- FreeBSD & Linux 討 論 版 | 0 | 2006-06-21 12:31 PM |
【求助】Intel P4(630)可使用的主機板 | td7405 | -- 電 腦 硬 體 討 論 版 | 7 | 2005-07-25 12:15 AM |
【轉貼】FAQ: Copying protected games HOWTO v1.4 | mk2 | -- 光 碟 燒 錄 討 論 版 | 4 | 2002-12-11 09:30 PM |
[HINET-ADSL]昨天(11/7)~今天(11/8)怪怪的??? | changron | ---- ADSL 抱 怨 與 鼓 勵 | 9 | 2001-11-10 07:08 PM |
XML | RSS 2.0 | RSS |
本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。