redhat-rpm-config/SOURCES/kmod.prov
2021-09-10 03:50:58 +00:00

18 lines
299 B
Bash

#!/bin/sh +x
IFS=$'\n'
for i in $(grep -E '(/lib/modules/.*\.ko|/lib/modules/.*/modules.builtin)');
do
kmod=$(basename $i | sed -e 's/.[xg]z//');
if [ $kmod == "modules.builtin" ]; then
for j in $(cat $i); do
j=$(basename $j);
echo "kmod($j)"
done
else
echo "kmod($kmod)"
fi
done