aboutsummaryrefslogtreecommitdiffstats
path: root/kmod.prov
blob: f02d8a0c9ce2b0ad67fa6f25ea3cb3b24b967586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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