Jon Masters 83405d
#!/bin/sh
Jon Masters 83405d
#
Jon Masters 83405d
# firmware.prov - Automatically extract any and all firmware dependencies from
Jon Masters 83405d
#                 kernel object (.ko) files and add to RPM deps.
Jon Masters 83405d
Jon Masters 83405d
IFS=$'\n'
Jon Masters 83405d
Jon Masters 83405d
for module in $(grep -E '/lib/modules/.+\.ko$') $*;
Jon Masters 83405d
do
Jon Masters 83405d
    for firmware in `/sbin/modinfo -F firmware $module`;
Jon Masters 83405d
    do
Jon Masters 83405d
        echo "firmware($firmware)"
Jon Masters 83405d
    done
Jon Masters 83405d
done