CentOS 5.4 sky2驱动出错解决办法
今天早上网卡有停止工作了:
########### Start Log on Sun Nov 22 05:40:13 CST 2009 ###########
=====run ‘uptime’ output log=====
05:40:13 up 14 days, 6:31, 0 users, load average: 0.01, 0.02, 0.00
=====run ‘ifconfig -a’ output log=====
通过写脚本搞定了,不用重新启动系统。
#!/bin/sh
. /etc/sysconfig/network-scripts/ifcfg-eth0
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
#GATEWAY=1.1.1.1
/bin/ping -c 3 $GATEWAY
if [ $? -ne 0 ]
then
#restart network & iproutes
modprobe -r sky2
sleep 5
modprobe sky2
sleep 5
/etc/init.d/network restart
fi