Bug 71087 - Typo in RAID setup in /etc/rc.d/rc.sysinit
Summary: Typo in RAID setup in /etc/rc.d/rc.sysinit
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-08 17:02 UTC by Stephen Walton
Modified: 2014-03-17 02:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 04:16:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Walton 2002-08-08 17:02:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Description of problem:
The grep command at line 439 in /etc/rc.d/rc.sysinit:

for i in `grep "^[^*]*raiddev" /etc/raidtab | awk '{print $2}'`

is incorrect.  I have an /etc/raidtab which contains the lines:

raid-level              0    # it's not obvious but this *must* be
                             # right after raiddev

and the above grep command returns the word 'right' as one of the raid devices
on my system.


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


How reproducible:
Always

Steps to Reproduce:
1. Put a comment like the above in /etc/raidtab.
2. Reboot.  The system will give a message like 'device right not found'.

	

Actual Results:  raidstart erroneously tried to start up a raid device called
'right'.

Expected Results:  It should have ignored the comment line.

Additional info:

Comment 1 A.J. Aranyosi 2002-11-23 17:39:13 UTC
I haven't tested this, but this bug could probably be fixed by changing the line
to read:

for i in `awk '{if($1=="raiddev") print $2}' /etc/raidtab`


Comment 2 A.J. Aranyosi 2002-11-23 19:06:56 UTC
Note that this bug can also be fixed using the third solution I posted in bug
#78467.

Comment 3 Bill Nottingham 2003-01-14 04:16:54 UTC
Tweak added in 7.03-1.


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