1
0
Files
kernel-source-vanilla/check-module-license
Kernel Bugs 398f7c9cd6 GIT Revision: 3fff0a00f0f2deb26fece4aa41d97acb50267ed3
GIT Branch: linux-next
2026-01-05 11:23:48 +0000
2026-01-06 08:04:37 +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