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