Originally Posted by sunnior
It didn't work.
When I login in on tty2, I get the following message:
Does that mean this script didn't run as root?
Placing the script script in /etc/network/if-pre-up.d should cause it to run automaticlly as root when you try to bring up the wireless interface. Were you trying to run the script manually? If you want to do that (presumably to test it) you will have to:
IFACE=eth1 sudo <path>/wireless_kludge
Substitute the correct path for <path> (I am not sure where you are running this from) and substitute the correct interface for eth1. (The interface must match what you set in the script or the script will exit w/o doing anything. And you should have set the value in the script to the interface that is used for wireless.)
I am not sure what the underlying problem is that this works around. So, after my first post, it occurred to me that depending on the underlying problem you may need to put the script in /etc/network/if-post-down.d instead of /etc/network/if-pre-up.d. This would cause it to run every time after
the wireless is shutdown
rather than before
the wireless is started
EDIT: After thinking about this, I may have misinterpreted your post. Were you seeing these error messages as a result of the script running in if-pre-up.d? If so you might need to run the script after
by moving the script to /etc/network/if-post_down.d. If you still need to run it prior to the first
time you bring up the wireless, you can put the commands in /etc/rc.local (or call the script from there, prefacing it -- on the same line -- with the appropriate IFACE= statement).
EDIT2: Yet further reflection makes me realize there might be a problem with the order that scripts are executing. In if-pre-up.d and if-post-down.d the scripts are executed in alphabetical order. If the script is in if-pre-up.d, add the letter "a" to the beginning of the name to force it to run first. If the script is in if-post-up.d, add the letter "z" to the beginning of the name to force it to run last.