Bug 442726 - Init script "status" does not set return value
Summary: Init script "status" does not set return value
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: vixie-cron
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-16 13:53 UTC by Tim Jackson
Modified: 2008-11-12 02:55 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-12 02:55:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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