Red Hat Bugzilla – Bug 281
init.d/functions status() grep for pid can fail
Last modified: 2014-03-16 22:08:38 EDT
The init.d functions script has a shell function called
status(). In the course of getting the status of a daemon
it must find its pid.
If pidof fails, it does a "ps | grep" to find it. However,
the grep process itself shows up in the output. This is
a common pitfall with this method; the usual remedy is to
add "| grep -v grep" in the pipeline to strip it out.
Patch en route.
This bug has been assigned to a developer.
*** Bug 314 has been marked as a duplicate of this bug. ***
This has been fixed in a slightly different way in the
development version of initscripts.