开发者

If lan is connected?

I want to write a开发者_如何学运维 script and put it in /etc/rc.local so that

if lan is connected then

rfkill block all

else

nmcli con up id 'Network id' --nowait

How should I write the if part and how should I check for "lan is connected" ?


You can check : How to detect the physical connected state of a network cable/connector?

I think at least one of the answer should work for you !

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜