[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



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.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.29
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages initrd-tools depends on:
ii  coreutils [fileutils]         5.2.1-2    The GNU core utilities
ii  cpio                          2.5-1.2    GNU cpio -- a program to manage ar
ii  cramfsprogs                   1.1-6      Tools for CramFs (Compressed ROM F
ii  dash                          0.5.2-1    The Debian Almquist Shell
ii  fileutils                     5.2.1-2    The GNU file management utilities 
ii  util-linux                    2.12-10    Miscellaneous system utilities

-- no debconf information
--- 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() {

Reply to: