wok-undigest view ovzkernel/stuff/check_modules.sh @ rev 1223

copied libxext recipe from wok-next
author Hans-G?nter Theisgen
date Fri Nov 15 17:38:29 2019 +0100 (2019-11-15)
parents
children
line source
1 #!/bin/sh
2 # Echo any module in kernel .config that's not added to one of linux-* pkgs
3 # (c) SliTaz - GNU General Public License.
4 # 20090618 <jozee@slitaz.org>
5 # 20100528 <pankso@slitaz.org>
6 #
7 if [ -f "./tazwok.conf" ]; then
8 . ./tazwok.conf
9 else
10 . /etc/tazwok.conf
11 fi
13 VERSION=`grep ^VERSION= $WOK/ovzkernel/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
14 src="$WOK/ovzkernel/ovzkernel-$VERSION"
16 cd $src
17 mkdir -p ../stuff/tmp
18 rm -f ../stuff/tmp/*
20 echo -e "\nChecking for modules selected in .config but not in ovzkernel-* pkgs"
21 echo "======================================================================"
23 # create a packaged modules list
24 cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list
26 for i in $(cd $WOK; ls -d ovzkernel-*)
27 do
28 tazpath="taz/$i-$VERSION"
29 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz")
30 do
31 echo "$WOK/$i/$tazpath"
32 basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list
33 done
34 done
35 # get the original list in .config
36 for i in $(find $_pkg -iname "*.ko.gz")
37 do
39 basename $i >> ../stuff/tmp/originial-"$VERSION".list
40 echo "$i"
41 done
42 # compare original .config and pkged modules
43 for i in $(cat ../stuff/tmp/originial-$VERSION.list)
44 do
45 if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then
46 modpath=`find $_pkg -iname "$i"`
47 echo "Orphan module: $i"
48 echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list
49 fi
50 done
51 if [ -f ../stuff/tmp/unpackaged-modules-"$VERSION".list ]; then
52 echo "======================================================================"
53 echo -e "Check ovzkernel/stuff/tmp/unpackaged-modules-$VERSION.list for mod path\n"
54 else
55 echo -e "\nAll modules are packaged\n"
56 echo "======================================================================"
57 echo ""
58 rm -rf ../stuff/tmp
59 fi