wok-6.x annotate linux/stuff/check_modules.sh @ rev 6605
Up: sqlobject to 0.12.1.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat Oct 09 17:20:13 2010 +0000 (2010-10-09) |
parents | 63937e3b2979 |
children | 2b6fda1dbf0d |
rev | line source |
---|---|
jozee@3509 | 1 #!/bin/sh |
jozee@3509 | 2 # Echo any module in kernel .config that's not added to one of linux-* pkgs |
pankso@5666 | 3 # (c) SliTaz - GNU General Public License. |
pankso@5666 | 4 # 20090618 <jozee@slitaz.org> |
pankso@5666 | 5 # 20100528 <pankso@slitaz.org> |
jozee@3509 | 6 # |
pankso@5640 | 7 . /etc/tazwok.conf |
pankso@5640 | 8 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
pankso@5640 | 9 src="$WOK/linux/linux-$VERSION" |
pankso@5640 | 10 |
pankso@5640 | 11 cd $src |
pankso@5640 | 12 mkdir -p ../stuff/tmp |
pankso@5640 | 13 rm -f ../stuff/tmp/* |
pankso@5640 | 14 |
pankso@5666 | 15 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs" |
pankso@5666 | 16 echo "======================================================================" |
pankso@5666 | 17 |
pankso@5640 | 18 # create a packaged modules list |
pankso@5640 | 19 cat ../stuff/modules-"$VERSION".list >> ../stuff/tmp/pkgs-modules-"$VERSION".list |
pankso@5640 | 20 |
pankso@5640 | 21 for i in $(cd $WOK; ls -d linux-*) |
pankso@5640 | 22 do |
pankso@5640 | 23 tazpath="taz/$i-$VERSION" |
pankso@5640 | 24 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz") |
pankso@5638 | 25 do |
pankso@5640 | 26 basename $j >> ../stuff/tmp/pkgs-modules-"$VERSION".list |
pankso@5640 | 27 done |
pankso@5640 | 28 done |
pankso@5640 | 29 # get the original list in .config |
pankso@5640 | 30 for i in $(find $_pkg -iname "*.ko.gz") |
pankso@5640 | 31 do |
pankso@5640 | 32 basename $i >> ../stuff/tmp/originial-"$VERSION".list |
pankso@5640 | 33 done |
pankso@5640 | 34 # compare original .config and pkged modules |
pankso@5640 | 35 for i in $(cat ../stuff/tmp/originial-$VERSION.list) |
pankso@5640 | 36 do |
pankso@5640 | 37 if ! grep -qs "$i" ../stuff/tmp/pkgs-modules-"$VERSION".list ; then |
pankso@5640 | 38 modpath=`find $_pkg -iname "$i"` |
pankso@5666 | 39 echo "Orphan module: $i" |
pankso@5666 | 40 echo "$i : $modpath" >> ../stuff/tmp/unpackaged-modules-"$VERSION".list |
jozee@3509 | 41 fi |
pankso@5640 | 42 done |
pankso@5640 | 43 if [ -f ../stuff/tmp/unpackaged-modules-"$VERSION".list ]; then |
pankso@5640 | 44 echo "======================================================================" |
pankso@5666 | 45 echo -e "Check linux/stuff/tmp/unpackaged-modules-$VERSION.list for mod path\n" |
pankso@5640 | 46 else |
pankso@5640 | 47 echo -e "\nAll modules are packaged\n" |
pankso@5666 | 48 echo "======================================================================" |
pankso@5666 | 49 echo "" |
pankso@5640 | 50 rm -rf ../stuff/tmp |
pankso@5640 | 51 fi |