1
0
forked from pool/kernel-source
Files
kernel-source/check-module-license
Michal Suchanek 81d8f088d5 GIT Revision: 76c2c9b6a2d8804737cec8c7208cc5a489db571c
GIT Branch: stable
2026-01-19 08:25:26 +0000
2026-01-21 09:26:42 +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