Red Hat Bugzilla – Bug 110761
dangerous code in /etc/rc.d/rc
Last modified: 2014-03-16 22:40:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016
Description of problem:
This caused me major problems. If my script
contains the words daemon, action, success or failure
then it's treated differently. The appropriate line is:
if egrep -q "(daemon |action |success |failure )" $i 2>/dev/null
There really should be something more robust here, like
checking for "KEYWORD: action" etc.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
try to get output from an initscript to console :-)
To clarify, if an init script contains any of the strings "daemon ", "action ",
"success ", or "failure ", /etc/rc.d/rc will exec it using
otherwise it will exec it using
'action $"Starting $subsys: " $i start'
This is prone to false positives and is causing the original reporter problems.
This is still applicable in initscripts 8.03 (i.e. lastest rawhide).
Fix in CVS, will be in 8.42-1.