Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 224500 - mkinitrd does not sort scsi_hostadapter correctly if more than 10 entries.
Summary: mkinitrd does not sort scsi_hostadapter correctly if more than 10 entries.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Brian Lane
QA Contact: Kevin Baker
Depends On:
TreeView+ depends on / blocked
Reported: 2007-01-25 22:32 UTC by John DeFranco
Modified: 2014-12-01 23:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-07-27 18:00:07 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description John DeFranco 2007-01-25 22:32:53 UTC
Description of problem:

mkinitrd does not sort the scsi_hostadapter in the /etc/modprobe.conf file
correctly if you have more than 10 entries. Overall this might not sound like
that big an issue but it is if you need certain scsi_hostadapter loaded before

Version-Release number of selected component (if applicable):

How reproducible:
Always. Just have scsi_hostadapter 1-10 (plus the one with no number) in the
modprobe.conf file and run mkinitrd. Check the results, by taking a part the
.img file and looking at the init file. It will show that driver specified by 
scsi_hostadapter10 is loaded third. 

A simpler test is to use the command that mkinitrd uses to sort these entries,

grep "alias[[:space:]]\+scsi_hostadapter" /etc/modprobe.conf | grep -v '^[     
  ]*#' | LC_ALL=C sort -u | awk '{ print $3 }'

The resulting list will show that scsi_hostadapter10 is in the third position.

Steps to Reproduce:
1. Create 11 valid scsi_hostadapter entries (1-10) in the /etc/modprobe.conf
2. Run mkinitrd
3. Examine the resulting .img file (unzip it, cpio -idumv < <file>). Look
at init file. Driver that is identified by scsi_hostadapter10 will be in 
the third position.

Actual results:

Expected results:

Additional info:

Comment 1 J.H. 2007-05-11 02:39:01 UTC
Duplicate of bug # 223938

Patches submitted to 223938

Note You need to log in before you can comment on or make changes to this bug.