aba5bdfd2532b357bccf76ad643574116b3a4fd0
[grml-live.git] / rewrite / create-scsi-mod-file.sh
1 #!/bin/sh
2 [ -n "$KERNEL" ] || KERNEL='2.6.20-grml'
3 for s in $(find /lib/modules/$KERNEL/kernel/drivers/scsi -name *.ko); do
4  # DEP=$(modinfo $s|grep '^depends:'|echo $(cut -d' ' -f2-))
5  DEP=$(modinfo $s|grep '^depends:'|cut -d' ' -f2-)
6  case $DEP in
7   *pcmcia*)
8    ;;
9   *)
10    modinfo $s|grep '^alias:'|grep pci|while read a; do
11     echo $a $DEP $(basename $s|sed 's/\.ko//')|cut -f3- -d:
12    done
13    ;;
14  esac
15 done|sort|uniq