adsmith's script doesn't work on Precise so I've reworked it and removed
the dependency on naming interfaces. My script will act whenever any
"eth*" interface comes or goes. It also logs to
"/var/log/NetworkManager.log".

Install to /etc/NetworkManager/prefer_wired_over_radio.sh

Once copied to that location do:

sudo chmod ug+x /etc/NetworkManager/prefer_wired_over_radio.sh
sudo ln -s /etc/NetworkManager/prefer_wired_over_radio.sh 
/etc/network/if-up.d/00prefer_wired_over_radio
sudo ln -s /etc/NetworkManager/prefer_wired_over_radio.sh 
/etc/network/if-post-down.d/00prefer_wired_over_radio

Watching the log-file whilst disconnecting and then reconnecting the
wired interface will show something like this:

# tail -f /var/log/NetworkManager.log
2013-02-23-15:28:34 prefer_wired_over_radio eth0 NetworkManager stop post-down
2013-02-23-15:28:34 Re-enabling Wireless interfaces since wired went away
2013-02-23-15:28:42 prefer_wired_over_radio wlan0 NetworkManager start post-up
2013-02-23-15:28:52 prefer_wired_over_radio eth0 NetworkManager start post-up
2013-02-23-15:28:52 Disabling Wireless interfaces whilst wired is active
2013-02-23-15:28:52 prefer_wired_over_radio wlan0 NetworkManager stop post-down


** Attachment added: "shell script to disable radio interfaces when wired is 
available"
   
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262152/+attachment/3543312/+files/prefer_wired_over_radio.sh

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/262152

Title:
  brings up both wired and wireless interfaces; hard to pick just one
  through the UI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262152/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to