1
0
forked from pool/kernel-source
Files
kernel-source/check-module-license
Kernel Bugs c123a5049d GIT Revision: 44608f7d45c948265c143ea6d1935ccf985f18c2
GIT Branch: master
2025-12-04 02:32:55 +0000
2025-12-04 08:46:44 +01:00

14 lines
293 B
Bash

#!/bin/sh
rc=0
for file in $(find "$@" -name '*.ko' -o -name '*.ko.xz' \
-o -name '*.ko.gz' -o -name '*.ko.zst'); do
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