Thanks loads for your reply!
Quote:
Originally Posted by neonsignal
Alternatively (and this might work better with network manager in control) is to modify the scripts in /etc/network/if-pre-up.d - you might already find one for wireless-tools. For example, some have the lines
Code:
if [ -n "$IF_WIRELESS_POWER" ]; then
$IWCONFIG "$IFACE" power $IF_WIRELESS_POWER
which means it is just a matter of setting IF_WIRELESS_POWER to 'off' at the start of the script.
|
That _should_ work, but it doesn't. As far as I can figure out, the folks working on the Gnome Network Manager decided that they didn't need to support the if-pre-up scripts! Nope, I've no idea why they thought that was a good idea... and I've also no idea why the directory still exists in Ubuntu 9.10 when it doesn't seem to get used.
Anyway, I've got it working now thanks to your pointers -- this is what I did:
Create a network "up" script:
Code:
$ sudo vim /etc/network/if-up/wifi_disable_power_management
And paste in the following:
Code:
#!/bin/sh
iwconfig "$IFACE" power off
Once the file has been saved, make it executable:
Code:
$ sudo chmod +x /etc/network/if-up/wifi_disable_power_management
I subsequently found
this post which is like your suggestion, but they've then symlinked the wireless-tools file to the if-up.d directory to make it get executed!!
All working now though -- thanks again!