Red Hat Bugzilla – Bug 49616
rc.sysinit still not robust enough in module configuration checks
Last modified: 2014-03-16 22:21:58 EDT
Description of Problem:
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
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?
This defect is considered SHOULD-FIX for Fairfax.
Should be fixed in initscripts-6.12-1.