Rather than using echo to return the firmware package name, call a
new function (addpkg) which will also deal with (i) no leading space
and (ii) remove duplicates (as some devices have dual-wifi-cards).
In addition we won't have a line break when having multiple packages.
While here also do not call pkg(8) anymore if there is no package to
install and actually use the variable to install all and not just the
last found package.