Bug#296894: initrd-tools: function module_exist doesn't recognize modules in subdirs
On Tue, Mar 01, 2005 at 07:17:40AM +0100, Cajus Pollmeier wrote:
>
> Am 01.03.2005 um 04:23 schrieb Horms:
>
> >On Fri, Feb 25, 2005 at 02:30:16PM +0100, Cajus Pollmeier wrote:
> >>Package: initrd-tools
> >>Version: 0.1.77
> >>Severity: normal
> >>
> >>While playing around with virtual scsi drivers, I noticed that modules
> >>that are not directly located inside drivers/scsi where not found by
> >>the script.
> >>
> >>The attached patch solves this problem.
> >
> >>--- mkinitrd 2005-01-23 19:37:41.000000000 +0100
> >>+++ mkinitrd.patched 2005-02-25 14:10:50.919976624 +0100
> >>@@ -413,7 +413,7 @@
> >> }
> >>
> >> module_exists() {
> >>- [ -f "$MODULEDIR/kernel/$1.$o" ]
> >>+ [ -n "$(find "$MODULEDIR/kernel/${1%%/*}" -name "${1##*/}.$o")" ]
> >> }
> >>
> >> print_module() {
> >
> >That seems fair enough to me, my only reservation is speed.
> >Did you notice a significant slowdown when using this?
> >Also, could you be a litte more specific about which modules
> >are not being found, and where they are coming from?
>
> The find is taking place in a kernel module subdirectory and machines
> are fast enough so that I didn't recognize any changes ;-) The module
> I'm talking about is (even in vanilla kernels >= 2.6.9) ibmvscsic, a
> virtual scsi driver on IBM power4/5 systems. Stumbled here while
> adapting the debian installer to work on this hardware.
Ok, understood.
Does anyone have any objections to putting this into SVN?
--
Horms
Reply to: