r1989 - in trunk/utils/initrd-tools: . debian

Joshua Kwan joshk@haydn.debian.org
Sun, 12 Dec 2004 18:21:12 -0700


Author: joshk
Date: 2004-12-12 18:20:53 -0700 (Sun, 12 Dec 2004)
New Revision: 1989

Modified:
   trunk/utils/initrd-tools/debian/changelog
   trunk/utils/initrd-tools/mkinitrd
Log:
fix typos, possible fix for Skaag

Modified: trunk/utils/initrd-tools/debian/changelog
===================================================================
--- trunk/utils/initrd-tools/debian/changelog	2004-12-11 08:39:21 UTC (rev 1988)
+++ trunk/utils/initrd-tools/debian/changelog	2004-12-13 01:20:53 UTC (rev 1989)
@@ -1,3 +1,13 @@
+initrd-tools (0.1.76) UNRELEASED; urgency=low
+
+  * Joshua Kwan
+    - Fix typo in Harald's workaround for drivers not listing SCSI
+      modules in /proc/scsi. (closes: #285301)
+    - Also fix in that same workaround a possible problem with module names
+      with hyphens that get flattened to underscores in 2.6.
+
+ -- Joshua Kwan <joshk@triplehelix.org>  Sun, 12 Dec 2004 17:17:11 -0800
+
 initrd-tools (0.1.75) experimental; urgency=low
 
   * Jeff Bailey

Modified: trunk/utils/initrd-tools/mkinitrd
===================================================================
--- trunk/utils/initrd-tools/mkinitrd	2004-12-11 08:39:21 UTC (rev 1988)
+++ trunk/utils/initrd-tools/mkinitrd	2004-12-13 01:20:53 UTC (rev 1989)
@@ -402,6 +402,7 @@
 getroot() {
 	local major minor device flag soft= setroot=
 	local OPTIND=1 OPTARG
+	local i
 
 	while getopts "rs" flag; do
 		case $flag in
@@ -542,8 +543,15 @@
 # New kernels don't list the scsi drivers in /proc/scsi
 #
 
-			for in in $(cat /proc/modules | awk '{if ( $4 == "-" ) print $1;}'); do
-				module_exists drivers/scsi/$i && echo $i;
+			for i in $(cat /proc/modules | awk '{if ( $4 == "-" ) print $1;}'); do
+				if module_exists drivers/scsi/$i; then
+					echo $i
+				elif ! [ $oldstyle ]; then
+					i=$(echo "$i" | sed 's/_/-/g')
+					if module_exists drivers/scsi/$i; then
+						echo $i
+					fi
+				fi
 			done | tac
 			echo sd_mod
 		;;