Script to disable Wifi if/when LAN is connected and vice versa on IGEL OS


I do have a profile on my current UMS, which i tested succesfully some time ago on older firmwares, which disables the Wifi IF , when LAN is connected and vice versa:

Learn more, read the entire thread inside the IGEL Community o Slack

echo ‘#!/bin/bash’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘if [ “$1” = “eth0” ]; then’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘case “$2” in’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘up)’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘nmcli radio wifi off’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘;;’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘down)’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘nmcli radio wifi on’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘;;’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘esac’ >> /etc/NetworkManager/dispatcher.d/99-wlan

echo ‘fi’ >> /etc/NetworkManager/dispatcher.d/99-wlan

chmod +x /etc/NetworkManager/dispatcher.d/99-wlan

and the 99-wlan file contains:

#!/bin/bash

if [ “$1” = “eth0” ]; then

case “$2” in

up)

nmcli radio wifi off

;;

down)

nmcli radio wifi on

;;

esac

fi

is this still the way to go to get that effect (Wifi off, when LAN is connected … ) ?


Will write you a PM. Moment.


Following as I have a similar script that we use. Please Post Suggestion here if that does not work well with the newer Firmware versions.


We tested and will put in Github asap.

Continue reading and comment on the thread ‘Script to disable Wifi if/when LAN is connected and vice versa on IGEL OS’.  Not a member? Join Here!

Learn more, search the IGEL Knowledge Base



Ask a question or comment on the above message thread?

Join or log in to the IGEL Community to ask us anything and meet other IGEL customers, partners, and EUC enthusiasts.

Submit a question, or Join Today!


Popular Message Threads


Categories & Tags: