Bug 74848 - functions script incorrectly looks at base name for status checks
functions script incorrectly looks at base name for status checks
Status: CLOSED DEFERRED
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.3
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-02 02:08 EDT by Matt Vanecek
Modified: 2014-03-16 22:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 16:16:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matt Vanecek 2002-10-02 02:08:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916

Description of problem:
In the status() function of /etc/rc.d/init.d/functions, the base name of the
process is queried.  This is the first check to determine the status of a
process.  It does not account for the fact that unique applications may share
the same base name, and therefore incorrectly reports that a process is running
when it is not.

For example, /usr/libexec/postfix/master and /usr/cyrus/bin/master.  Cyrus will
fail to start every time because it starts after postfix, and functions.status()
tells the cyrus script that "master" is already running.

Since the various init scripts tap into RedHat's functions, the functions should
be more intelligent in situations like this.  Using the entire path works with
pidof, and it's reasonable to consider that init scripts would have and use the
correct path information (e.g., /usr/cyrus/bin/master).

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


How reproducible:
Always

Steps to Reproduce:
1. Re-IPL
2. View boot sequence
3. Note that Postfix starts, and that later, cyrus does not start.  The cyrus
failure is directly attributable to the status received from functions.status(),
indicating "master" is already running.
	

Expected Results:  The correct results would be generated if functions.status()
used a "pidof /usr/cyrus/bin/master" instead of a "pidof /usr/cyrus/bin/master
|| pidof master".  This latter case will always be true if there is a different
application that has the same base name as one that is started later in the boot
sequence.

Additional info:
Comment 1 Bill Nottingham 2005-09-29 16:16:36 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

If this persists on a current release, such as Fedora Core 4, please open a new bug.

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