hi Steen,
Would it be easier to manipulate onboot.lst when you set wifi "on" or "off"? That way you can skip all of the wifi extensions not just the firmware extensions. Obviously, it would require a reboot.
In your first code segment, I would put a "/" before the home directory. Relative paths make it more difficult to test scripts.
In the second bit of code, I think (not tested) the else and exit statements are not required and the paths to the extensions are not required as they are the default locations.
regards