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