其他分享
首页 > 其他分享> > openwrt有线网卡的停用与开启

openwrt有线网卡的停用与开启

作者:互联网

一、有线网卡

1、开启

ifup lan

2、关闭

ifdown lan

二、无线网卡

1、开启

ifup wwan
wifi up

2、关闭

ifdown wwan
wifi down

三、外网连接测试

local server="www.baidu.com"
status=$(ping -q -c 10 -W 1 $server > /dev/null 2>&1 && echo "ok" || echo "fail")
if [ "$status" = "fail" ]; then
	echo "************************[net_test]:server:"$server"  network error"  > /dev/console
fi

  

  

  

  

  

  

  

  

标签:status,echo,网卡,openwrt,ifdown,fail,server,停用
来源: https://www.cnblogs.com/yuanqiangfei/p/15704411.html