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 !
精彩评论