1
0
Files
kernel-source/check-module-license
Kernel Bugs b93a998209 GIT Revision: e2c35ef2bb2958362915aa3e20e89eea1061175d
GIT Branch: SLE15-SP7
2025-12-03 07:15:28 +0000
2025-12-04 08:35:06 +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