然后在系统管理》脚本设置》初始化里加入脚本
#!/bin/sh
GET_PPP_GATEWAY() {
iface=$1
echo "iface="$iface
PPP_IP=$(ifconfig $iface|grep "inet addr"|awk -F ":" '{print $2}'|awk -F " " '{print $1}')
PPP_GATEWAY=$PPP_IP
}
#1分钟后开始检测WAN1, WAN2
sleep 60
WAN1_IF=$(nvram get wan_iface)
WAN2_IF=$(nvram get wan2_iface)
if [ "$WAN1_IF" == "" ] || [ "$WAN2_IF" == "" ]; then
echo "2WAN fail"
kill -SIGHUP 1
else
GET_PPP_GATEWAY $WAN1_IF
if [ "$PPP_IP" == "" ]; then
kill -SIGHUP 1
exit
fi
GET_PPP_GATEWAY $WAN2_IF
if [ "$PPP_IP" == "" ]; then
kill -SIGHUP 1
exit
fi
echo "2WAN ok"
fi 脚本论坛里有,坛主发的http://bbs.dualwan.biz/ 华硕本身不就双wan么难道这个是一线多播?
页:
1
[2]