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 2529 - mkbootdisk fails if conf.modules has redundant lines
Summary: mkbootdisk fails if conf.modules has redundant lines
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mkbootdisk
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Matt Wilson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-05-04 00:43 UTC by rbh00
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-08-21 19:56:32 UTC

Attachments (Terms of Use)

Description rbh00 1999-05-04 00:43:58 UTC
My i386 system has two scsi adapters.  Perhaps for this
reason, the contents of my /etc/conf.modules file has
redundant entries.  Here is the file's contents:
	alias scsi_hostadapter aic7xxx
	alias eth0 eepro100
	alias scsi_hostadapter aic7xxx
	alias eth0 eepro100
	alias scsi_hostadapter aic7xxx

Now, mkbootdisk (a shell script) scans this file to set its
variable "ethmodule" at line 80:
	ethmodule=`awk '/^alias eth0/ { print $3 }' \
This results in ethmodule being set to a file with two
lines, that is, to "eepro100\neepro100", and that in turn
causes script /sbin/mkinitrd to cough out its usage message
and fail to do its normal stuff.

(At line 91 witheth is set to "$witheth --with $ethmodule"
and at line 140 $witheth is one of the arguments to

To fix:  Change the "awk" statement at line 80 to eliminate
redundant lines in the conf.modules file:
	ethmodule=`sort /etc/conf.modules | uniq | \
		awk '/^alias eth0/ { print $3 }'`

Note:  This is the stuff of bug 2405 that I tried and failed
to submit to you last Wed Apr 28.  Sorry it took me so long
to regenerate the bug.

Oh and thanks for all your free stuff!


Comment 1 rbh00 1999-05-04 00:52:59 UTC
(Later that same day)
A better replacement for line 80 uses the -u option of sort:
	ethmodule=`sort -u /etc/conf.modules |
		awk '/^alias eth0/ { print $3 }'`

Comment 2 David Lawrence 1999-07-02 19:55:59 UTC
I have verified this does occur on a standard 6.0 install.

Comment 3 Bill Nottingham 1999-08-21 19:56:59 UTC
fixed in mkbootdisk-

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