Bug 2529

Summary: mkbootdisk fails if conf.modules has redundant lines
Product: [Retired] Red Hat Linux Reporter: rbh00
Component: mkbootdiskAssignee: Matt Wilson <msw>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-08-21 19:56:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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-