mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 20:00:09 +01:00
examples: update 70-wifi-wired-exclusive.sh for new nmcli syntax
This commit is contained in:
parent
9dd2c58e99
commit
8de9bfcf7d
1 changed files with 4 additions and 2 deletions
|
|
@ -10,9 +10,11 @@ enable_disable_wifi ()
|
|||
{
|
||||
result=$(nmcli dev | grep "802-3-ethernet" | grep -w "connected")
|
||||
if [ -n "$result" ]; then
|
||||
nmcli nm wifi off
|
||||
nmcli radio wifi off
|
||||
#with older nmcli, use nmcli nm wifi off
|
||||
else
|
||||
nmcli nm wifi on
|
||||
nmcli radio wifi on
|
||||
#with older nmcli, use nmcli nm wifi on
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue