Bug 442726

Summary: Init script "status" does not set return value
Product: [Fedora] Fedora Reporter: Tim Jackson <rpm>
Component: vixie-cronAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-11-12 02:55:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Jackson 2008-04-16 13:53:32 UTC
Description of problem:
When running "service crond status", the return value is the same regardless of
whether crond is running or not. 

Additional information:
Most daemons return a different value. The internal "status" function in
/etc/init.d/functions does return different values but the crond init script
fails to pass these on via $RETVAL.

Snippet from crond init script:

==============================
  status)
        status $CROND
        ;;
==============================

Comparable section from httpd init script (which does the right thing):

==============================
  status)
        status $httpd
        RETVAL=$?
        ;;
==============================

Version-Release number of selected component (if applicable):
vixie-cron-4.2-8.fc8

How to reproduce:
# service crond status
crond (pid 2769) is running...
# echo $?
0
# service crond stop
Stopping crond:                                            [  OK  ]
# service crond status
crond is stopped
# echo $?
0

The last value should not be 0.

Comment 1 Marcela Mašláňová 2008-05-02 10:41:17 UTC
For example:
http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT

The service is running or OK -> output is 0

Comment 2 Tim Jackson 2008-05-02 10:50:42 UTC
Are we reading the same document? From the very link you sent:

"3	program is not running"


Comment 3 Marcela Mašláňová 2008-05-02 12:06:21 UTC
Hm, I was sure, that I fixed all init scripts.
I'll fix it in next update of vixie-cron.

Comment 4 Fedora Update System 2008-10-30 11:43:10 UTC
vixie-cron-4.2-9.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/vixie-cron-4.2-9.fc8

Comment 5 Fedora Update System 2008-10-31 10:23:31 UTC
vixie-cron-4.2-9.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update vixie-cron'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-9310

Comment 6 Fedora Update System 2008-11-12 02:54:59 UTC
vixie-cron-4.2-9.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.