wok-6.x view linux/stuff/check_modules.sh @ rev 5638
linux: fix check_modules.sh and tiny improvment
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 28 16:16:06 2010 +0200 (2010-05-28) |
parents | 2ae67cafd57e |
children | 63937e3b2979 |
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
6 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
7 src="$WOK/linux/linux-$VERSION"
9 cd $src
10 mkdir -p ../stuff/tmp
11 rm -f ../stuff/tmp/* # clean up
12 # create a packaged modules list
13 cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list
15 for i in $(cd $WOK; ls -d linux-*)
16 do
17 tazpath="taz/$i-$VERSION"
18 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
19 do
20 basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list
21 done
22 done
23 # get the original list in .config
24 for i in $(find $_pkg -iname "*.ko.gz")
25 do
26 basename $i >> ../stuff/tmp/originial-"$VERSION".list
27 done
28 # compare original .config and pkged modules
29 for i in $(cat ../stuff/tmp/originial-$VERSION.list)
30 do
31 if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then
32 modpath=`find $_pkg -iname "$i"`
33 echo "$i" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list
34 echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION"-full.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 "======================================================================"
42 echo -e "Check linux/stuff/tmp/unpackaged-modules-$VERSION-full.list to see\n"
43 else
44 rm -r ../stuff/tmp
45 fi