From the man Page (http://linux.die.net/man/8/iwconfig):
commit
Some cards may not apply changes done through Wireless Extensions immediately (they may wait to aggregate the changes or apply it only when the card is brought up via ifconfig). This command (when available) forces the card to apply all pending changes.
This is normally not needed, because the card will eventually apply the changes, but can be useful for debugging.
I'd try starting the wifi without the "commit" command and if it still works, leave it out of the bootlocal.sh command. The "essid" and "key" commands are often all you need to connect with iwconfig (followed by "pump", of course).