当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 超级问题,等了一晚上没有人回答!河南网通DHCP+ 按照WIKI方法操作后依然不能上网!
帖子发表于 : 2008-08-29 5:47 
头像

注册: 2008-08-29 4:53
帖子: 11
送出感谢: 0 次
接收感谢: 0 次
网卡:RTL8169/8110 Family Gigabit Ethernet NIC

按照Wiki中河南网通的第二种方法做完全部步骤后

出现如下信息:

All names of your net interface installed
-----------------------------------------
eth0 0
Input one name to hace access with Internet (eth0):
The name of interface is: eth0
Failed to run the process


修改后的ecou.sh文件 为:
#!/bin/sh
export RACERC=/opt/racer
export PATH=$PATH:/racer
EXCUTE_NAME="racer"
X_NAME="race"

verify_system()
{
#check if this is a linux platform, if not linux, alert and quit
if [ `uname` != "Linux" ]; then
echo "This process being available ONLY on Linux"
return 1
fi

#check if it's root, otherwise quit
if [ `whoami` != "root" ]; then
echo "No more than root has previlege to run this process"
return 1
fi
#check size of log file
if [ -f "ecou.log" ]; then
FSIZE=`du -ks ecou.log | awk '{print $1}'`
if [ $FSIZE -gt 1000 ]; then
>ecou.log #clear the log file
fi
else
>ecou.log
fi

return 0
}

find_ecou()
{
#FINDNUM=`ps -ef | grep "$EXCUTE_NAME" | grep -v grep | wc -l`
FINDNUM=`pgrep -nx "$EXCUTE_NAME" | wc -l`
if [ $FINDNUM -eq 0 ]; then
return 1
else
return 0
fi
}

start_ecou()
{
if find_ecou
then
echo "The pocess is running"
exit
fi

#to which interface link with Internet
INTERNUM=`ifconfig -a | grep "HWaddr" | wc -l`
if [ $INTERNUM -eq 0 ]; then
echo "No net Interface can be found, may you type command such as insmod and ifup eth0 first"
return 1
fi

#if more than ONE eth installed, have to select one
CMPNUM=0
if [ "$INTERNUM" -gt "$CMPNUM" ]; then
ifconfig -a | grep "HWaddr" | awk '
BEGIN {
i=0;
printf("All names of your net interface installed\n");
printf("-----------------------------------------\n");
}
{
printf("\t%s\t%d\n", $1, i);
i++;
}'
echo -n "Input one name to hace access with Internet (eth0): "
read INTERNAME
if [ ! $INTERNAME ]; then #default name is eth0
INTERNAME="eth0"
fi
#if the name input is correct or not
TMP_NUM=`ifconfig -a | grep "HWaddr" | grep "$INTERNAME" | wc -l`
if [ $TMP_NUM -eq 0 ]; then
echo "You have input an invalid name of net interface"
return 1
fi
else
INTERNAME=`ifconfig -a |grep "HWaddr" | awk '{print $1}'`
fi
echo "The name of interface is: " $INTERNAME

#okey, we have got correct env & parameters to run this process
#However, definitly necessary ini files as well as process file must be found
#in the same path
if [ ! -f "racer.ini" ]; then
echo "Warning: No relative file racer.ini found, re-creating"
echo "Server1=218.29.0.227" >racer.ini
echo "Server2=218.29.0.228" >>racer.ini
fi

if [ ! -f "$X_NAME" ]; then
echo "Unable to find process to run, try re-install your process again!"
return 1
fi

if [ ! -x "$X_NAME" ]; then
chmod +x $X_NAME
fi

if [ ! -L "$EXCUTE_NAME" ]; then
ln -s $X_NAME $EXCUTE_NAME
fi

./$EXCUTE_NAME $INTERNAME

RETVAL=$?
if [ ! $RETVAL -eq 0 ]; then
echo "Failed to run the process"
else
echo "$EXCUTE_NAME has been started successfully"
fi

return 0
}

#for help info
usage()
{
echo "Usage: $0 {[start]|[status]|[stop]}"
}

#to stop ecou
stop_ecou()
{
#ps -ef | grep "$EXCUTE_NAME" | grep -v grep | awk '{print $2}' | xargs kill -SIGINT 2>/dev/null
pgrep -nx "$EXCUTE_NAME" | xargs kill -SIGINT 2>/dev/null
FINDNUM=1
while [ ! $FINDNUM -eq 0 ]
do
#FINDNUM=`ps -ef | grep "$EXCUTE_NAME" | grep -v grep | wc -l`
FINDNUM=`pgrep -nx "$EXCUTE_NAME" | wc -l`
sleep 1
done
if [ $? -eq 0 ]; then
echo "The process has been halted successfully"
else
echo "Failed to terminate the process OR the process is not running"
fi
}

#to tell status
tell_status()
{
#ps -ef | grep "$EXCUTE_NAME" | grep -v grep | awk '{print $2}' | xargs kill -SIGUSR1 2>/dev/null
pgrep -nx "$EXCUTE_NAME" | xargs kill -SIGUSR1 2>/dev/null
if [ $? -eq 0 ]; then
return;
else
echo "No status returned for $EXCUTE_NAME"
fi
}

#main
PARAM_NUM=$#
if [ ! $PARAM_NUM -eq 1 ]; then
usage
exit
fi

if [ -n $RACERC ]; then
cd $RACERC
fi

if ! verify_system
then
exit
fi

case $1 in
start) start_ecou;;
status) tell_status;;
stop) stop_ecou;;
*) usage;;
esac


ifconfig -a查看到的网络连接信息为:
eth0 Link encap:Ethernet HWaddr 00:11:09:d7:52:8e
inet addr:10.164.34.14 Bcast:10.164.34.31 Mask:255.255.255.224
inet6 addr: fe80::211:9ff:fed7:528e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:993 errors:0 dropped:0 overruns:0 frame:0
TX packets:194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66172 (64.6 KB) TX bytes:31450 (30.7 KB)
Interrupt:16 Base address:0x8c00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1064 errors:0 dropped:0 overruns:0 frame:0
TX packets:1064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:53200 (51.9 KB) TX bytes:53200 (51.9 KB)



/etc/network/interfaces 内容为:
auto lo
iface lo inet loopback



iface eth0 inet dhcp

auto eth0





期间重启,重新安装 无数次均未能解决,新手求助,不胜感谢!


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-08-29 6:57 
头像

注册: 2008-01-23 14:02
帖子: 884
地址: 吉林大学
送出感谢: 0 次
接收感谢: 0 次
两个办法

1 在论坛里继续问,最好能找到一个河南的……

2 打网通电话投诉,威胁要投诉到信息产业部,强迫他们给你用pppoe。记得有个帖子里面的高人就是这么做的,是不是河南的我不知道……


_________________
立柱博客:书写生活,记录时间-哲学|互联网|文艺|英语


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2008-08-29 11:16 
头像

注册: 2008-08-29 4:53
帖子: 11
送出感谢: 0 次
接收感谢: 0 次
zhexuezhuzi 写道:
两个办法

1 在论坛里继续问,最好能找到一个河南的……

2 打网通电话投诉,威胁要投诉到信息产业部,强迫他们给你用pppoe。记得有个帖子里面的高人就是这么做的,是不是河南的我不知道……


老实说,你的回答很好很强大

只是主意有点馊


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译