mkinitrd unification across distributions
 help / color / mirror / Atom feed
* [PATCH] Fix instmods recursing indefinitely
@ 2009-02-27 12:25 Seewer Philippe
  0 siblings, 0 replies; only message in thread
From: Seewer Philippe @ 2009-02-27 12:25 UTC (permalink / raw)
  To: <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>

the instmod function inside dracut-functions starts to recurses indefinitely
if modprobe --show-depends is used and the output contains module options. 

Example:

#modprobe --show-depends libata
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/acpi/dock.ko 
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/scsi/scsi_mod.ko 
insmod /lib/modules/2.6.27-11-generic/kernel/drivers/ata/libata.ko ignore_hpa=1


This patch fixes this.

--
 dracut-functions |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 852ce36..56b3757 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -177,7 +177,7 @@ instmods() {
 	    =*) instmods $mpargs $(cat "${modcat}.${mod#=}");;
 	    --*) mpargs+=" $mod";;
 	    *) modprobe $mpargs --set-version $kernel --show-depends $mod \
-		2>/dev/null |while read cmd modpath; do
+		2>/dev/null |while read cmd modpath options; do
 		    [[ $cmd = insmod ]] || continue
 		    modname=${modpath##*/}
 		    modname=${modname%.ko}
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-27 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 12:25 [PATCH] Fix instmods recursing indefinitely Seewer Philippe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox