I have written a little script to configure my wlan device in gentoo linux more easily some time ago. I blogged about it here
While working with it I never encountered any problems. But now Tobias Schlitt discovered a little bug.
The script seems to create some fragged config variables, if special characters like "!" are used in the accesspoint name.
Toby was so kind to append a patch to his bug report.
I have just incorporated it into the net script combined with some little changes I made to it since the last time. You can download it below.