Bug 35147 - daemon function --check option broken
daemon function --check option broken
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-04-07 20:22 EDT by Russell Steffen
Modified: 2014-03-16 22:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-07 20:22:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Russell Steffen 2001-04-07 20:22:41 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14enterprise i686)


When the daemon function attempts to determine if a program is already
running, it calls the pidofproc() function with the name of the executable
it's about to run (in $1) instead of the name passed in with the --check
option (in $base). This makes the --check option effectively
non-functional. This option worked correctly in Red Hat 6.2.

Reproducible: Always
Steps to Reproduce:
I came across this while setting up to run 2 instancess of BIND, each
listening to different interfaces. I set up a second config file that 
specified that the pid should be stored in /var/run/named-external.pid. I
then copied the /etc/init.d/named file, altered the damon line to look
like:
daemon --check named-external named -c /etc/named-external.conf

The result was that it would not start if the original named was running,
but started correctly if the original named was shut down. The is because
the daemon function was looking for the existance of /var/run/named.pid
instead of /var/run/named-external.pid.
Comment 1 Bill Nottingham 2001-07-10 21:16:02 EDT
This is fixed in 6.00-1.

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