wok annotate linux/stuff/check_modules.sh @ rev 8302
Fix: check_module.sh (into linux stuff) modified to works with tazwok-experimental
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Feb 01 02:51:09 2011 +0100 (2011-02-01) |
parents | 3fe781270709 |
children | 1d89aa1672da |
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 # |
gokhlayeh@8302 | 7 WOK=$(cd `basedir $0` && pwd | sed 's/wok.*/wok/') |
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 |
gokhlayeh@8302 | 12 mkdir -p ../tmp |
gokhlayeh@8302 | 13 rm -f ../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 |
gokhlayeh@8302 | 19 cat ../stuff/modules-"$VERSION".list >> ../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 |
gokhlayeh@8302 | 26 basename $j >> ../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 |
gokhlayeh@8302 | 32 basename $i >> ../tmp/originial-"$VERSION".list |
pankso@5640 | 33 done |
pankso@5640 | 34 # compare original .config and pkged modules |
gokhlayeh@8302 | 35 for i in $(cat ../tmp/originial-$VERSION.list) |
pankso@5640 | 36 do |
gokhlayeh@8302 | 37 if ! grep -qs "$i" ../tmp/pkgs-modules-"$VERSION".list ; then |
pankso@5640 | 38 modpath=`find $_pkg -iname "$i"` |
pankso@5666 | 39 echo "Orphan module: $i" |
gokhlayeh@8302 | 40 echo "$i : $modpath" >> ../tmp/unpackaged-modules-"$VERSION".list |
jozee@3509 | 41 fi |
pankso@5640 | 42 done |
gokhlayeh@8302 | 43 if [ -f ../tmp/unpackaged-modules-"$VERSION".list ]; then |
pankso@5640 | 44 echo "======================================================================" |
gokhlayeh@8302 | 45 echo -e "Check linux/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 "" |
gokhlayeh@8302 | 50 rm -rf ../tmp |
pankso@5640 | 51 fi |