1
0
forked from pool/kernel-source
Files
kernel-source/check-module-license
Kernel Bugs 88d116a8c1 GIT Revision: 702ea50d0265e6d50afe6bedc7c502e4556c2059
GIT Branch: SLE15-SP7
2026-01-05 15:50:22 +0000
2026-01-06 08:02: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