1

Is there any way to bring down wireless on wired link detection using the tools mentioned in the title? Two automatic services are enabled: netctl-auto and netctl-ifplugd on coresponding interfaces.

2
  • blacklist the driver modules in /etc/modprobe.d/ Nov 8, 2016 at 23:30
  • I don't want to disable this permanently, only when and if I connect to wired link, preferably when unplugged wirelss connection would be re-established.
    – muthuh
    Nov 8, 2016 at 23:36

1 Answer 1

2

When I use my EE mobile wifi I have it auto connect to a VPN, this same method would work for this;

create a file:

/etc/NetworkManager/dispatcher.d/wifi-stop.sh

This will be run when the network changes, so my script is checking which wifi is connected and if it matches ... and i'm not connected to ... vpn connect...

your script will need to check if there is a eth connection then do ifdown... stop connection ...

something like;

if [ -n "$(nmcli con show --active | grep -i eth)" ]; then nmcli con down id "..."; fi

for netctl;

(/etc/netctl/hooks)

if [ "$profile" == "eth-profile-name" -a "$action" == "CONNECT" ]; then
 netctl stop wifi-profile-name
fi
3
  • I am not using NM..
    – muthuh
    Nov 8, 2016 at 23:34
  • netctl also has the same, "/etc/netctl/hooks" Nov 8, 2016 at 23:37
  • ok I'll look into netctl hooks, thanks, I knew these exist, just wasn't sure how to use them
    – muthuh
    Nov 8, 2016 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .