Bug 2529 - mkbootdisk fails if conf.modules has redundant lines
mkbootdisk fails if conf.modules has redundant lines
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: mkbootdisk (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-05-03 20:43 EDT by rbh00
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-21 15:56:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rbh00 1999-05-03 20:43:58 EDT
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 }' \
/etc/conf.modules
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
mkinitrd.)

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!

Richard
Comment 1 rbh00 1999-05-03 20:52:59 EDT
(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 15:55:59 EDT
I have verified this does occur on a standard 6.0 install.
Comment 3 Bill Nottingham 1999-08-21 15:56:59 EDT
fixed in mkbootdisk-1.2.1.1.

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