wok view linux/stuff/check_modules.sh @ rev 5182
linux: fix kernel_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 27 20:38:05 2010 +0100 (2010-03-27) |
parents | f87a39ef0f12 |
children | 2ae67cafd57e |
line source
1 #!/bin/sh
2 # Echo any module in kernel .config that's not added to one of linux-* pkgs
3 # 2009/06/18 <jozee@slitaz.org> - GNU General Public License.
4 #
5 . /etc/tazwok.conf
7 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
8 src="$WOK/linux/linux-$VERSION"
10 cd $src
11 mkdir -p ../stuff/tmp
12 rm -f ../stuff/tmp/* # clean up
13 # create a packaged modules list
14 cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list
16 for i in $(cd $WOK; ls -d linux-*)
17 do
18 tazpath="taz/$i-$VERSION"
19 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
20 do
21 basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list
22 done
23 done
24 # get the original list in .config
25 for i in $(find $_pkg -iname "*.ko.gz")
26 do
27 basename $i >> ../stuff/tmp/originial-"$VERSION".list
28 done
29 # compare original .config and pkged modules
30 for i in $(cat ../stuff/tmp/originial-$VERSION.list)
31 do
32 if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then
33 modpath=`find $_pkg -iname "$i"`
34 echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list;
35 fi
36 done
37 if [ -f ../stuff/tmp/unpackaged-modules-"$VERSION".list ]; then
38 echo "======================================================================"
39 echo " These modules selected in .config were not categorized in linux-* pkgs:"
40 cat ../stuff/tmp/unpackaged-modules-$VERSION.list
41 #echo "Check linux/stuff/tmp/unpackaged-modules-$VERSION.list to see"
42 echo "======================================================================"
43 else
44 rm -r ../stuff/tmp
45 fi