原脚本:
[root@adsl ppp]# vi pppoe.sh
#!/bin/bash
if !(ping -c 5 www.163.com &>/dev/null 2>&1);then
/bin/date >> /etc/ppp/pppoe.log
#/usr/bin/killall -9 pppoe
/sbin/service network restart
echo "redail......" >> /etc/ppp/pppoe.log
else
/bin/date >> /etc/ppp/pppoe.log
echo "It is normal !!!" >> /etc/ppp/pppoe.log
fi
可能是因为使用service network restart来重启网络连线的缘故,最主要是reboot了eth0这块网卡,可能导致依赖于eth0的一些iptables不起作用了,所以诸如一些服务如FTP,NetMeeting,PPS等使用不了,但是,如果重新启动服务器就可以了。于是只有更改脚本,改变重启网络连线的方式了--only reboot pppo & eth1相关网卡,再测一下吧! (经测试修改完全成功,是因为reboot eth0的缘故)
新脚本:
阅读(648) | 评论(0) | 转发(0) |
<script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/buttonLite.js#style=-1&uuid=&pophcol=3&lang=zh"></script> <script type=text/javascript charset=utf-8 src="http://static.bshare.cn/b/bshareC0.js"></script>
[root@adsl ppp]# vi pppoe.sh
#!/bin/bash
if !(ping -c 5 www.163.com &>/dev/null 2>&1);then
/bin/date >> /etc/ppp/pppoe.log
#/usr/bin/killall -9 pppoe
/sbin/service network restart
echo "redail......" >> /etc/ppp/pppoe.log
else
/bin/date >> /etc/ppp/pppoe.log
echo "It is normal !!!" >> /etc/ppp/pppoe.log
fi
可能是因为使用service network restart来重启网络连线的缘故,最主要是reboot了eth0这块网卡,可能导致依赖于eth0的一些iptables不起作用了,所以诸如一些服务如FTP,NetMeeting,PPS等使用不了,但是,如果重新启动服务器就可以了。于是只有更改脚本,改变重启网络连线的方式了--only reboot pppo & eth1相关网卡,再测一下吧! (经测试修改完全成功,是因为reboot eth0的缘故)
新脚本:
|
相关热门文章
给主人留下些什么吧!~~
评论热议