]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- same names caused variable covering and wrong results (fixed)
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 10 Aug 2003 20:27:27 +0000 (20:27 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 10 Aug 2003 20:27:27 +0000 (20:27 +0000)
- don't try to load module unknown
- don't fail if modules not found (staticly compiled?)

svn-id: @1284

geninitrd

index 4fbe08df80bb76f9400326d37b8e23fb571ceb1c..ae4ed9b2702397915bb27fdd8852717eae514348 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -6,7 +6,7 @@
 #
 # based on mkinitrd from RedHat
 
-RCSID='$Id: geninitrd,v 2.37 2003/08/10 12:21:30 arekm Exp $'
+RCSID='$Id: geninitrd,v 2.38 2003/08/10 20:27:27 arekm Exp $'
 PATH=/sbin:$PATH
 export PATH
 
@@ -407,9 +407,9 @@ find_modules_ide() {
                    if [ -f "$modulefile" ]; then
                         [ -n "$verbose" ] && echo "Finding IDE modules using ide_hostadapter"
                        idemodules="`awk '/ide_hostadapter/ && ! /^[\t ]*#/ { print $3; }' $modulefile`"
-                       for n in $idemodules; do
+                       for na in $idemodules; do
                            tryauto=0;
-                           findmodule "$n"
+                           findmodule "$na"
                        done
                    fi
 
@@ -417,8 +417,8 @@ find_modules_ide() {
                      if [ -r /usr/share/pci-database/ide.pci ]; then
                        [ -n "$verbose" ] && echo "Finding IDE modules using PCI ID database"
                        idemodules=""
-                       for n in $(awk ' { print $2 } ' /proc/bus/pci/devices); do
-                           eval `awk -v pciid="$n" 'BEGIN {
+                       for nb in $(awk ' { print $2 } ' /proc/bus/pci/devices); do
+                           eval `awk -v pciid="$nb" 'BEGIN {
 }
                
 {
@@ -449,16 +449,17 @@ END {
                                [ "$gomax" -ne 0 -a "$gomin" -ne 0 ] && idemodules="$idemodules $module"
                            fi
                        done
-                       idemodules=$(for n in $idemodules; do echo "$n"; done | xargs)
-                       for n in $idemodules; do
-                           findmodule "-$n"
+                       idemodules=$(for nc in $idemodules; do echo "$nc"; done | xargs)
+                       for nd in $idemodules; do
+                           findmodule "-$nd"
                        done
                      else
                          echo "WARNING: /usr/share/pci-database/ide.pci missing. Automatic IDE modules finding not available."
                      fi
                    fi
+               else
+                       findmodule "$n"
                fi
-               findmodule "$n"
            done
        fi
 }
This page took 0.057144 seconds and 4 git commands to generate.