河南网通DHCP+ 按照Wiki方法操作后依然不能上网!

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
头像
Gendle
帖子: 11
注册时间: 2008-08-29 4:53

河南网通DHCP+ 按照Wiki方法操作后依然不能上网!

#1

帖子 Gendle » 2008-08-29 11:14

网卡: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





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


麻烦各位了

问题已经解决了
locale的毛病

谢谢四楼的“dogfox”!

原因如下:


中文版本下 删掉导致中文locale下无法上网的 文件
sudo rm /usr/share/locale-langpack/zh_CN/LC_MESSAGES/net-tools.mo
如果你用英文版就不用管,更新中文语言包的话就给删掉,要不上不了网
上次由 Gendle 在 2008-08-31 19:26,总共编辑 1 次。
头像
Gendle
帖子: 11
注册时间: 2008-08-29 4:53

#2

帖子 Gendle » 2008-08-29 11:53

还是没人回答....
头像
nowindows
帖子: 9
注册时间: 2008-08-27 17:06
来自: CHINA

#3

帖子 nowindows » 2008-08-29 13:17

唉,老兄,我也没连上,没想到这东西上个网也这个难,还以为跟WINDOWS里加个连接设置下就行了,
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

#4

帖子 dogfox » 2008-08-29 13:25

你的确是按照wiki上修改的吗?

使用

代码: 全选

locale
检查下
全世界linux爱好者联合起来 !
头像
Gendle
帖子: 11
注册时间: 2008-08-29 4:53

#5

帖子 Gendle » 2008-08-30 16:01

dogfox 写了:你的确是按照wiki上修改的吗?

使用

代码: 全选

locale
检查下
用我们俩的人头担保:确实是!

你说的那个locale主要是用来检测语言包的不是?

新手忘细解,感谢万分!
头像
dogfox
论坛版主
帖子: 5311
注册时间: 2006-09-02 14:18
来自: 汉桑城
联系:

#6

帖子 dogfox » 2008-08-30 16:04

Gendle 写了:
dogfox 写了:你的确是按照wiki上修改的吗?

使用

代码: 全选

locale
检查下
用我们俩的人头担保:确实是!

你说的那个locale主要是用来检测语言包的不是?

新手忘细解,感谢万分!
呃,是脚趾头还是手指头? :twisted:

我是说看下你locale的返回结果
全世界linux爱好者联合起来 !
xiaoleebaba
帖子: 13
注册时间: 2007-08-29 15:20

我试过可以。

#7

帖子 xiaoleebaba » 2008-08-30 21:07

出现这个问题,就是路径变量设置有问题。修改ecou.sh,在文件中找到你所看到的提示信息,在这一行前加上一行: cd ~/racer,也就是转到你的当前目录即可。但要在racer目录下运行./ecou.sh start.这样才能找到命令。一定要加./,只有这样才能找到命令。

我的也是这个网卡,搞了很久也没完全解决。但我发现了一个现象,只要启动时,MOUse可正常使用,就可以上网,否则就会出现找不到DHCP服务器的提示。不知道是怎么回事。
xiaoleebaba
帖子: 13
注册时间: 2007-08-29 15:20

请注意。

#8

帖子 xiaoleebaba » 2008-08-30 21:09

应该是在这一行之前加上一行命令。./$EXCUTE_NAME $INTERNAME
xiaoleebaba
帖子: 13
注册时间: 2007-08-29 15:20

记错了

#9

帖子 xiaoleebaba » 2008-08-31 20:56

昨天是解决另外一个问题的。出现你说的情况应该是库文件版本太新了。请下载libstdc++.so.5.tar.gz文件,解压到Lib文件夹下即可。
xiaoleebaba
帖子: 13
注册时间: 2007-08-29 15:20

就是这个东东

#10

帖子 xiaoleebaba » 2008-08-31 20:57

请下载
附件
libstdc++.so.5.tar.gz
(225.71 KiB) 已下载 235 次
回复