2018-04-04 08:43:11 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
rc=0
|
2021-09-03 07:05:56 +02:00
|
|
|
for file in $(find "$@" -name '*.ko' -o -name '*.ko.xz' \
|
|
|
|
-o -name '*.ko.gz' -o -name '*.ko.zst'); do
|
2018-04-04 08:43:11 +02:00
|
|
|
l=$(/sbin/modinfo -F license "$file")
|
|
|
|
if [ -z "$l" ]; then
|
|
|
|
echo "ERROR: No license is included for module ${file##*/lib/modules/}"
|
|
|
|
rc=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $rc
|