wok-current annotate linux/stuff/check_modules.sh @ rev 9798
udev-light: fix stuff path (again)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 14 13:48:00 2011 +0200 (2011-05-14) |
parents | 2010b1abc210 |
children | 6f536abe4f0b |
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 # |
slaxemulator@8681 | 7 #. /etc/slitaz/slitaz.conf |
slaxemulator@8681 | 8 |
slaxemulator@8681 | 9 #WOK=$LOCAL_REPOSITORY/wok |
slaxemulator@8681 | 10 WOK=$(cd `dirname $0` && pwd | sed 's/wok.*/wok/') |
pankso@5640 | 11 VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
pankso@5640 | 12 src="$WOK/linux/linux-$VERSION" |
pankso@5640 | 13 |
pankso@5640 | 14 cd $src |
slaxemulator@8728 | 15 mkdir -p $WOK/$PACKAGE/tmp |
slaxemulator@8728 | 16 rm -f $WOK/$PACKAGE/tmp/* |
pankso@5640 | 17 |
pankso@5666 | 18 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs" |
pankso@5666 | 19 echo "======================================================================" |
pankso@5666 | 20 |
pankso@5640 | 21 # create a packaged modules list |
slaxemulator@8728 | 22 cat ../stuff/modules-"$VERSION".list >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list |
pankso@5640 | 23 |
pankso@5640 | 24 for i in $(cd $WOK; ls -d linux-*) |
pankso@5640 | 25 do |
pankso@5640 | 26 tazpath="taz/$i-$VERSION" |
slaxemulator@9640 | 27 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then |
slaxemulator@9639 | 28 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko.gz") |
slaxemulator@9639 | 29 do |
slaxemulator@9639 | 30 basename $j >> $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list |
slaxemulator@9639 | 31 done |
slaxemulator@9639 | 32 fi |
pankso@5640 | 33 done |
pankso@5640 | 34 # get the original list in .config |
slaxemulator@9639 | 35 for i in $(find $_pkg -iname "*.ko.gz") |
pankso@5640 | 36 do |
slaxemulator@8728 | 37 basename $i >> $WOK/$PACKAGE/tmp/originial-"$VERSION".list |
pankso@5640 | 38 done |
pankso@5640 | 39 # compare original .config and pkged modules |
slaxemulator@9639 | 40 for i in $(cat $WOK/$PACKAGE/tmp/originial-$VERSION.list) |
slaxemulator@9639 | 41 do |
slaxemulator@9639 | 42 if ! grep -qs "$i" $WOK/$PACKAGE/tmp/pkgs-modules-"$VERSION".list ; then |
pankso@5640 | 43 modpath=`find $_pkg -iname "$i"` |
pankso@5666 | 44 echo "Orphan module: $i" |
slaxemulator@8728 | 45 echo "$i : $modpath" >> $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list |
jozee@3509 | 46 fi |
pankso@5640 | 47 done |
slaxemulator@8728 | 48 if [ -f $WOK/$PACKAGE/tmp/unpackaged-modules-"$VERSION".list ]; then |
pankso@5640 | 49 echo "======================================================================" |
gokhlayeh@8302 | 50 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n" |
pankso@5640 | 51 else |
pankso@5640 | 52 echo -e "\nAll modules are packaged\n" |
pankso@5666 | 53 echo "======================================================================" |
pankso@5666 | 54 echo "" |
slaxemulator@8728 | 55 rm -rf $WOK/$PACKAGE/tmp |
pankso@5640 | 56 fi |