HomeFreeBSD

fwget: simplify adding firmware images to pkg to install

Description

fwget: simplify adding firmware images to pkg to install

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 use the correct variable to install all and not just the
last found package.

Reviewed by: manu, bapt
Differential Revision: https://reviews.freebsd.org/D40071

Details

Provenance
bzAuthored on May 11 2023, 8:30 PM
Reviewer
manu
Differential Revision
D40071: fwget: simplify adding firmware images to pkg to install
Parents
rGae1e336e0517: LinuxKPI: add put_unaligned_le16() and get_unaligned_be64()
Branches
Unknown
Tags
Unknown