/etc/acpi/wireless.sh unwanted behaviours
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hello, I was looking at the code in /etc/wireless.sh. I found a big problem in two cases
1) the user doesn't have a wireless device
2) the user has got more than one wireless device
in the former case wireless.sh does not return anything (in my opinion it should return 0). So my laptop has a wireless hotkey and a wireless led but not a wireless device (I bought it because it was cheaper). So when I hit the hotkey the led comes up, because wireless.sh does not return 0!
the latter case is more complicated. For instance immagine that the user has 2 wireless devices. one integrated and one external (he bought the external one because it was faster). whenever he hits the hotkey, wireless.sh will begin the "for" cycle and find the first wireless card: it will switch off the device and echo "0" (+ \n). Then the for goes into the second device and does the same thing. the result is:
0
0
and both cards are off. what about the led?? it's on! because wireless.sh should have returned 0, not 0\n0!
NOTE: the led is handled by /etc/acpi/
And... What will happen if one card is on and the other is off???
I will attach a new proposed wireless.sh.
this might be a good replacement, let me know