From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2a) Gecko/20020910 Description of problem: the function is_wireless_device in /etc/services/network-scripts/network-functions is completely wrong. The way it is, ifup-wireless will be executed for every net device that is NOT a wireless device. As a consequence, ifup-wireless will NEVER be executed for wireless devices. The reason is the usage of wrong return codes in lines 2 and 3 of the function. Version as shipped reads: function is_wireless_device () { if [ -x /sbin/iwconfig ] return 1; LC_ALL=C iwconfig $1 2>&1 | grep "no wireless extension" || return 0; return 1; } Completely wrong for two reasons: The second line will execute the "return 0" part if and only if the result of "iwconfig $1 2>&1 | grep "no wireless extensions" is not zero. Now, bash uses 0 to signal SUCCESS. Which means that if the search string is found, the "return 0" part won't be triggered. Even if it was (which can be easily accomplished by changing the command to "LC_ALL=C iwconfig $1 2>&1 | grep "no wireless extenstion" && return 0;" we win nothing. The reason is the way the evaluation is done in the script ifup: Here the commands "is_wireless_device(${DEVICE}) && . ./ifup-wireless" are issued. This instructs bash to source ifup-wireless, if and only if the result of is_wireless_device is ZERO. In short: is_wireless_device always returns the wrong exit status if /sbin/iwconfig is installed on a given system. Imho, is_wireless_device should look like this: function is_wireless_device () { if [ -x /sbin/iwconfig ] return 1; LC_ALL=C iwconfig $1 2>&1 | grep "no wireless extension" && return 1; return 0; } Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Change the ESSID of a WLAN adapter or try to activate encryption 2. Insert the WLAN card to activate the hotplug system 3. Check whether your changes made it to the adapter configuration. They won't have. Additional info:
You're reading it wrong. > "iwconfig $1 2>&1 | grep "no wireless extensions" is not zero. Now, bash uses 0 > to signal SUCCESS. Which means that if the search string is found, the "return > 0" part won't be triggered. *Exactly*. You only return 0 if the search string *isn't* found, which means there *are* wireless extensions.