[root@oscheckdb ~]# cat test_eh0.sh
#!/bin/shell
ifconfig | grep eth0 > geteth0
i=1
num=$(cat 1|wc -l)
if [ "$i" -eq "$num" ];
then
ifup eth0
else
/etc/init.d/network restart
sleep = 10
fi
#!/bin/shell
ifconfig | grep eth0 > geteth0
i=1
num=$(cat 1|wc -l)
if [ "$i" -eq "$num" ];
then
ifup eth0
else
/etc/init.d/network restart
sleep = 10
fi
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15187685/viewspace-761098/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15187685/viewspace-761098/