Bug 662411

Summary: incorrect exit code for service rpcbind status
Product: [Fedora] Fedora Reporter: Cristian Ciupitu <cristian.ciupitu>
Component: rpcbindAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: steved
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpcbind-0.2.0-8.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-17 20:31:46 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:
Attachments:
Description Flags
Patch for /etc/init.d/rpcbind none

Description Cristian Ciupitu 2010-12-12 14:21:14 UTC
Description of problem:
"service rpcbind status" should return 3 if the rpcbind service is not running[1].

Version-Release number of selected component (if applicable):
rpcbind-0.2.0-7.fc14.x86_64

How reproducible:
Every time

Steps to Reproduce:
1. Make sure the rpcbind service is stopped, e.g. run "service rpcbind stop"
2. Run "service rpcbind status; echo $?"
  
Actual results:
rpcbind is stopped
0

Expected results:
rpcbind is stopped
0

Additional info:
The source code of /etc/init.d/rpcbind includes this snippet:

  status)
        status $prog
        ;;

and as you can see RETVAL is not set, so it always have the initial value which is 0.

[1] http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action

Comment 1 Cristian Ciupitu 2010-12-12 14:24:13 UTC
Errata:
Expected results:
rpcbind is stopped
3

Comment 2 Cristian Ciupitu 2010-12-12 14:31:39 UTC
Created attachment 468222 [details]
Patch for /etc/init.d/rpcbind

Comment 3 Steve Dickson 2010-12-13 16:21:06 UTC
The build is at:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2661385

Comment 4 Steve Dickson 2010-12-14 17:07:19 UTC
The Fedora 14 build:
     http://koji.fedoraproject.org/koji/taskinfo?taskID=2663450

Comment 5 Fedora Update System 2010-12-14 17:08:34 UTC
rpcbind-0.2.0-8.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/rpcbind-0.2.0-8.fc14

Comment 6 Fedora Update System 2010-12-15 08:59:57 UTC
rpcbind-0.2.0-8.fc14 has been pushed to the Fedora 14 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 rpcbind'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/rpcbind-0.2.0-8.fc14

Comment 7 Fedora Update System 2010-12-17 20:31:39 UTC
rpcbind-0.2.0-8.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.