wok annotate linux/stuff/check_modules.sh @ rev 14234
linux: update wget_url, use ftp
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 22 09:04:12 2013 +0100 (2013-03-22) |
parents | c0298010efaf |
children | db5b03f42dd9 |
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@12285 | 12 BASEVER="${VERSION:0:3}" |
pankso@12285 | 13 src="$WOK/linux/source/linux-$VERSION" |
pankso@5640 | 14 |
pankso@5640 | 15 cd $src |
pascal@14028 | 16 tmp=$WOK/${PACKAGE:-linux}/tmp |
pascal@14028 | 17 mkdir -p $tmp 2>/dev/null |
pascal@14028 | 18 rm -f $tmp/* |
pankso@5640 | 19 |
pankso@5666 | 20 echo -e "\nChecking for modules selected in .config but not in linux-* pkgs" |
pankso@5666 | 21 echo "======================================================================" |
pankso@5666 | 22 |
pankso@5640 | 23 # create a packaged modules list |
pascal@14028 | 24 cat $WOK/linux/stuff/modules.list >> $tmp/pkgs-modules-"$VERSION".list |
pankso@5640 | 25 |
pankso@12285 | 26 for i in $(cd $WOK; grep -l '^WANTED="linux"' */receipt | sed 's|/receipt||g') |
pankso@5640 | 27 do |
pankso@12285 | 28 tazpath="taz/$i-*" |
slaxemulator@9640 | 29 if [ ! $(grep -l 'linux-libre' $WOK/$i/receipt) ]; then |
pascal@13930 | 30 for j in $(cat $WOK/$i/$tazpath/files.list | grep ".ko..z") |
slaxemulator@9639 | 31 do |
pascal@14028 | 32 basename $j >> $tmp/pkgs-modules-"$VERSION".list |
slaxemulator@9639 | 33 done |
slaxemulator@9639 | 34 fi |
pankso@5640 | 35 done |
pankso@5640 | 36 # get the original list in .config |
pascal@13930 | 37 for i in $(find $_pkg -iname "*.ko.?z") |
pankso@5640 | 38 do |
pascal@13930 | 39 basename $i |
pascal@14028 | 40 done > $tmp/original-"$VERSION".list |
pankso@5640 | 41 # compare original .config and pkged modules |
pascal@14028 | 42 for i in $(cat $tmp/original-$VERSION.list) |
slaxemulator@9639 | 43 do |
pascal@14028 | 44 if ! grep -qs "$i" $tmp/pkgs-modules-"$VERSION".list ; then |
pankso@5640 | 45 modpath=`find $_pkg -iname "$i"` |
pankso@5666 | 46 echo "Orphan module: $i" |
pascal@14028 | 47 echo "$i : $modpath" >> $tmp/unpackaged-modules-"$VERSION".list |
jozee@3509 | 48 fi |
pankso@5640 | 49 done |
pascal@14028 | 50 if [ -f $tmp/unpackaged-modules-"$VERSION".list ]; then |
pankso@5640 | 51 echo "======================================================================" |
gokhlayeh@8302 | 52 echo -e "Check linux/tmp/unpackaged-modules-$VERSION.list for mod path\n" |
pankso@5640 | 53 else |
pankso@5640 | 54 echo -e "\nAll modules are packaged\n" |
pankso@5666 | 55 echo "======================================================================" |
pankso@5666 | 56 echo "" |
pascal@14028 | 57 rm -rf $tmp |
pankso@5640 | 58 fi |