All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Modify instmods to not rely on the existence of modules.* files
@ 2009-03-04  0:21 Victor Lowther
       [not found] ` <d53985b1c536e2fb845e0e3c369edd06d5018011.1236124962.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Victor Lowther @ 2009-03-04  0:21 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

This patch series aims to make dracut more distro-independent.  It includes
some of the functionality that Seewer Philippe posted to the list to make 
dracut work on Ubuntu.

depmod does not create these files on all distros (Debian, specifically),
so modify instmods to use pathname components and find to do what we want.

As a bonus, this removes the special-case for =ata.
---
 dracut-functions |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 852ce36..f40694e 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -167,17 +167,17 @@ dracut_install() {
     done
 }
 
-modcat="/lib/modules/$kernel/modules"
+srcmods="/lib/modules/$kernel/"
 instmods() {
     local mod mpargs modpath modname cmd
     while (($# > 0)); do
 	mod=${1%.ko}
+	mod=${mod##*/}
 	case $mod in
-	    =ata) instmods $mpargs $(cat "${modcat}.block" |egrep 'ata|ahci');;
-	    =*) instmods $mpargs $(cat "${modcat}.${mod#=}");;
+	    =*) instmods $mpargs $(find "$srcmods" -path "*/${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}
@@ -185,7 +185,7 @@ instmods() {
 			instmods $mpargs $modname
 			continue
 		    }
-		    inst_simple "$modpath" "/lib/modules/$kernel/$modname.ko"
+		    inst_simple "$modpath"
 		done
 		;;
 	esac
-- 
1.6.0.6

--
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] 19+ messages in thread

end of thread, other threads:[~2009-03-06 15:36 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-04  0:21 [PATCH 1/4] Modify instmods to not rely on the existence of modules.* files Victor Lowther
     [not found] ` <d53985b1c536e2fb845e0e3c369edd06d5018011.1236124962.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-04  0:21   ` [PATCH 2/4] Get rid of some RedHat specific modules and udev rules Victor Lowther
     [not found]     ` <1d16a0aef8ab7f83212bd12dd71908f5c1a1a2a5.1236124962.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-04  0:24       ` Jeremy Katz
2009-03-04  0:21   ` [PATCH 3/4] Steal rules we need from the latest udev package Victor Lowther
     [not found]     ` <462be3c3cfdf24ba51bc4d1a1f66cc30b8d29d82.1236124962.git.victor.lowther-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-04  0:25       ` Jeremy Katz
     [not found]         ` <20090304002535.GB96609-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-03-04  1:16           ` Victor Lowther
     [not found]             ` <1236129369.6500.18.camel-76q0VzFBGGr21HsLBtNmTckMGDeJXHgy@public.gmane.org>
2009-03-04 10:12               ` Kay Sievers
     [not found]                 ` <ac3eb2510903040212m5d68d812kbce03d831e8c3d12-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-04 11:33                   ` Victor Lowther
     [not found]                     ` <1236166408.6500.37.camel-76q0VzFBGGr21HsLBtNmTckMGDeJXHgy@public.gmane.org>
2009-03-04 12:08                       ` Kay Sievers
     [not found]                         ` <ac3eb2510903040408w299b349aj791a2f9e0d154b9a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-04 12:18                           ` Thiago Galesi
     [not found]                             ` <82ecf08e0903040418v23e68261le6c2a05f032a9b31-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-06  9:33                               ` Karel Zak
     [not found]                                 ` <20090306093301.GB3301-sHeGUpI7y9L/9pzu0YdTqQ@public.gmane.org>
2009-03-06 10:17                                   ` Kay Sievers
     [not found]                                     ` <ac3eb2510903060217l1866919ag17b778e58cadb58a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-06 10:57                                       ` Harald Hoyer
2009-03-06 15:36                                       ` maximilian attems
2009-03-04 14:06                           ` Kay Sievers
     [not found]                             ` <ac3eb2510903040606j63ed9992r273b97efeb9a6e73-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-04 14:17                               ` Victor Lowther
2009-03-04  0:27       ` Thiago Galesi
     [not found]         ` <82ecf08e0903031627p2af2ce66s8e777716eff2b823-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-04  0:56           ` Victor Lowther
2009-03-04  0:21   ` [PATCH 4/4] Fix several inst functions Victor Lowther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.