5 # written by Michael Gebetsroither (michael.geb@gmx.at)
7 # 11.04.2005 - initial release (Michael Gebetsroither)
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, look at
22 # http://www.gnu.org/licenses/gpl.txt, or write to the Free Software
23 # Foundation, Inc., 59 Temple Place - Suite 330, Boston,
28 MODULES_=$(awk '/ethernet/{print $3}' /lib/discover/pci.lst |sort |uniq |xargs)
31 if [[ "$1" == "" ]]; then
32 echo "you have to give me the path to your modules.dep" >&2
36 #for i in $MODULES_; do
37 # awk -F: '{if($1~/'"$i"'/) {print $1}}' /lib/modules/$KERNEL_VERSION_/modules.dep
40 for i in $MODULES_; do
41 #awk -F: '{if($1~/'"$i"'/) {print $2}}' /lib/modules/$KERNEL_VERSION_/modules.dep
42 tmp_=`awk -F: '{if($1~/'"$i".ko'/) {print $0}}' $MODULES_DEP_`
44 echo "${tmp_#*:}" |xargs -n1 echo |sed 's/://'
46 | sort | uniq | while read module relax; do
47 if [ -n "$module" ]; then
48 #echo "cp $module" "INITRD/modules/net/00_${module##*/}"
49 echo -n "$module" >> $TMP
50 echo -n "$relax" >> $TMP
55 #for i in $MODULES_; do
56 # tmp_=`awk -F: '{if($1~/'"$i".ko'/) {print $0}}' /lib/modules/$KERNEL_VERSION_/modules.dep`
57 # echo first-match-$i--${tmp_%%:*}
58 # echo ${tmp_#*:} |xargs -n1 echo
61 #|while read module relax; do
62 # echo "module=\"$module\" relax=\"$relax\""