[readonly/geninitrd/devel: 234/334] modulefile checking is done only once now (duplicates removed).

draenog draenog at pld-linux.org
Sat Nov 2 19:31:12 CET 2013


commit f121024fb698c3eab3007ff5c048b176ca2eefee
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Sep 1 16:38:50 2004 +0000

    modulefile checking is done only once now (duplicates removed).
    
    svn-id: @4453

 geninitrd | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 6c8f021..efd1aa7 100755
--- a/geninitrd
+++ b/geninitrd
@@ -34,7 +34,7 @@ force=""
 verbose=""
 MODULES=""
 img_vers=""
-modulefile="/etc/modules.conf"
+modulefile=""
 raidtab="/etc/raidtab"
 fstab="/etc/fstab"
 insmod="insmod"
@@ -427,12 +427,6 @@ END {
 find_modules_scsi() {
 	for n in $PRESCSIMODS; do
 		if [ "X$n" = "Xunknown" ] ; then
-		    	if [ "$pack_version" -ge "002005" ]; then
-			    	modulefile=/etc/modprobe.conf
-			fi
-			if [ ! -f "$modulefile" ]; then
-				modulefile=/etc/conf.modules
-			fi
 			if [ -f "$modulefile" ]; then
 				scsimodules="`awk '/scsi_hostadapter/ && ! /^[\t ]*#/ { print $3; }' $modulefile`"
 				for n in $scsimodules; do
@@ -460,12 +454,6 @@ find_modules_ide() {
 	    tryauto=1
 	    for n in $PREIDEMODS; do
 		if [ "X$n" = "Xunknown" ] ; then
-		    if [ "$pack_version" -ge "002005" ]; then
-			    	modulefile=/etc/modprobe.conf
-		    fi
-    		    if [ ! -f "$modulefile" ]; then
-			modulefile=/etc/conf.modules
-    		    fi
     		    if [ -f "$modulefile" ]; then
 			 [ -n "$verbose" ] && echo "Finding IDE modules using ide_hostadapter"
 			idemodules="`awk '/ide_hostadapter/ && ! /^[\t ]*#/ { print $3; }' $modulefile`"
@@ -908,7 +896,16 @@ fi
 if [ ! -f /proc/mounts ]; then
     	echo "/proc filesystem not mounted, may cause wrong results or failure." 1>&2
 fi
-    
+
+if [ "$pack_version" -lt "002005" ]; then
+	modulefile=/etc/modules.conf
+	if [ ! -f "$modulefile" -a -f /etc/conf.modules ]; then
+		modulefile=/etc/conf.modules
+	fi
+else
+	modulefile=/etc/modprobe.conf
+fi
+ 
 for n in $PREMODS; do
 	findmodule "$n"
 done
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11



More information about the pld-cvs-commit mailing list