2008-07-18 12:15:21 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
sourcedir=$1
|
|
|
|
modpath=$2
|
|
|
|
|
|
|
|
# Check for modules not listed in supported.conf: First, for each module
|
|
|
|
# in the list, set mod_$module=1
|
|
|
|
for module in $($sourcedir/guards --list < $sourcedir/supported.conf \
|
|
|
|
| sed -e 's,.*/,,'); do
|
|
|
|
m=${module##*/}
|
|
|
|
m=${m%.ko}
|
|
|
|
eval mod_${m//-/_}=1
|
|
|
|
done
|
|
|
|
|
|
|
|
# Check if any installed module was not listed
|
|
|
|
status=
|
|
|
|
cd $modpath
|
2008-10-12 00:19:34 +02:00
|
|
|
for module in $(find . -name '*.ko' | sort); do
|
2009-12-04 12:15:16 +01:00
|
|
|
case "$module" in
|
|
|
|
./kernel/drivers/staging/* | ./kernel/Documentation/*)
|
|
|
|
continue ;;
|
|
|
|
esac
|
2008-07-18 12:15:21 +02:00
|
|
|
module=${module%.ko}
|
|
|
|
m=${module##*/}
|
|
|
|
m=${m//-/_}
|
|
|
|
m="mod_$m"
|
|
|
|
if [ -z "${!m}" ]; then
|
|
|
|
if [ -z "$status" ]; then
|
|
|
|
echo "Modules not listed in supported.conf:"
|
|
|
|
status=1
|
|
|
|
fi
|
|
|
|
echo ${module#./}
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
exit $status
|