wok annotate linux/stuff/list_modules.sh @ rev 3746
Add: acl
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Thu Jul 23 13:37:17 2009 +0000 (2009-07-23) |
parents | b563b08e4f32 |
children | 720fade32b40 |
rev | line source |
---|---|
pascal@886 | 1 #!/bin/sh |
pascal@886 | 2 # list_modules.sh: list Linux kernel modules for SliTaz GNU/Linux. |
pascal@886 | 3 # 2008/06/07 <pascal.bellard@slitaz.org> - GNU General Public License. |
pascal@886 | 4 # |
pascal@886 | 5 |
pascal@886 | 6 if [ -z "$1" ] ; then |
pascal@886 | 7 cat 1>&2 <<EOT |
pascal@886 | 8 |
pascal@886 | 9 \033[1musage:\033[0m `basename $0` path/to/kernel-modules-subtrees |
pascal@886 | 10 exemple `basename $0` drivers/net/wireless >list |
pascal@886 | 11 |
pascal@886 | 12 EOT |
pascal@886 | 13 exit 1 |
pascal@886 | 14 fi |
pascal@886 | 15 |
pascal@1032 | 16 if [ -z "$(ls -d $_pkg/lib/modules/*-slitaz/kernel/$1 2> /dev/null)" ] ; then |
pascal@886 | 17 cat 1>&2 <<EOT |
pascal@886 | 18 |
pascal@886 | 19 Error : $1 does not exist. |
pascal@886 | 20 |
pascal@886 | 21 EOT |
pascal@886 | 22 exit 1 |
pascal@886 | 23 fi |
pascal@886 | 24 |
pascal@886 | 25 for tree in $@; do |
pascal@886 | 26 for module in $(find $_pkg/lib/modules/*-slitaz/kernel/$tree \ |
pascal@886 | 27 -type f -exec basename {} \;) ; do |
pascal@1909 | 28 grep /$module: $_pkg/lib/modules/*-slitaz/modules.dep || |
pascal@1909 | 29 find $_pkg/lib/modules/*-slitaz/kernel/$tree -name $module |
pascal@886 | 30 done | awk '{ for (i = 1; i <= NF; i++) print $i; }' |
pascal@3540 | 31 done | sort | uniq | sed -e 's,.*slitaz/,,' -e 's,^kernel/,,' -e 's/:$//' | \ |
pascal@886 | 32 while read module; do |
pascal@886 | 33 grep -qs ^$module$ $src/modules.list && continue |
pascal@886 | 34 echo $module |
pascal@886 | 35 done |