2016-04-05

Disable WLan if Wired/Cable Network is enabled

You can drop this script to /etc/NetworkManager/dispatcher.d/99-wlan:
#!/bin/bash

if [ "$1" = "eth0" ]; then
    case "$2" in
        up)
            nmcli radio wifi off
            ;;
        down)
            nmcli radio wifi on
            ;;
    esac
fi
Don't forget afterwards:
chmod +x /etc/NetworkManager/dispatcher.d/99-wlan

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.