Bug 200996 - "/sbin/service jabberd status" always returns 0
Summary: "/sbin/service jabberd status" always returns 0
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: jabberd
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Adrian Reber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-02 05:06 UTC by Matthew West
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-08-07 14:18:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthew West 2006-08-02 05:06:20 UTC
Description of problem:
Running "/sbin/service jabberd status" returns 0 whether jabberd is running or not, which breaks 
automated admin scripts.

Version-Release number of selected component (if applicable):
jabberd-2.0-0.s11.9.fc5

How reproducible:
Always.

Steps to Reproduce:
[root@host ~]# service jabberd status
router (pid 25257) is running...
resolver (pid 25287) is running...
sm (pid 25317) is running...
c2s (pid 25347) is running...
s2s (pid 25378) is running...
[root@host ~]# echo $?
0
[root@host ~]# service jabberd stop
Terminating jabberd processes ...
Stopping router:                                           [  OK  ]
Stopping resolver:                                         [  OK  ]
Stopping sm:                                               [  OK  ]
Stopping c2s:                                              [  OK  ]
Stopping s2s:                                              [  OK  ]
[root@host ~]# service jabberd status
router is stopped
resolver is stopped
sm is stopped
c2s is stopped
s2s is stopped
[root@host ~]# echo $?
0
  
Actual results:
The return status of "/sbin/status jabberd status" is 0 even when jabberd is stopped.

Expected results:
The return status should be 3 if jabberd is not running.

Additional info:
The rhstatus() function in /etc/init.d/jabberd should store and return $? just as does the preceding 
reload() function.

This is the same problem as described for openldap in bug 63241.

Comment 1 Adrian Reber 2006-08-07 14:18:10 UTC
Fixed for FC5 and FC6 branches.


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