1
0
Files
kernel-source-vanilla/check-module-license
Kernel Bugs 3e2bf56257 GIT Revision: 0e98e0fdab1e1c445c781a0ed5d991e0f752dbd1
GIT Branch: linux-next
2025-12-03 11:24:26 +0000
2025-12-04 08:46:18 +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