Bug 49616

Summary: rc.sysinit still not robust enough in module configuration checks
Product: [Retired] Red Hat Linux Reporter: Michal Jaegermann <michal>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-23 21:18:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2001-07-21 17:16:37 UTC
Description of Problem:

Lines like

if grep -q "options sound dmabuf=1" /etc/modules.conf ...

in /etc/rc.d/rc.sysinit are faulty because they will be found
even if this line is commented out but they will be missed if
white space is used in a different way.  To solve both problems
at the same time this should really read:

if modprobe -c | grep -q "options sound dmabuf=1" ....

OTOH lines with

if modprobe -c | egrep -s "<elaborate matching pattern>" ...

are really only waisting CPU cycles, especially if an output is
piped to 'awk', because:

   1) 'modprobe -c' normalizes white space in its output anyway
   2)  the whole job could be done in awk only and in a simpler
       manner.

Right now this looks like a close relative of a "dead cat".

P.S.  It _seems_ to me that I was already submitting in the past
a bug report like that. But I could not find any traces in my notes
nor while searching on bugzilla.  Maybe I only intended to?

Comment 1 Glen Foster 2001-07-23 21:17:58 UTC
This defect is considered SHOULD-FIX for Fairfax.

Comment 2 Bill Nottingham 2001-08-07 06:39:30 UTC
Should be fixed in initscripts-6.12-1.