重启 检测默认路由

ip route ls table all|grep default|grep via

rc.local修改 添加   sudo vim /etc/init.d/rc.local 

cd /home/zzx/
./test_route.sh &

 

#!/bin/bash
sleep 100
ip route ls table all|grep -q via && reboot ||echo "lost"

 

 

 

sudo chmod +x test_route.sh

posted on 2014-12-02 16:33  寒星12345678999  阅读(202)  评论(0编辑  收藏  举报