[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#296894: initrd-tools: function module_exist doesn't recognize modules in subdirs



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?

-- 
Horms



Reply to: