Bug 662411 - incorrect exit code for service rpcbind status
Summary: incorrect exit code for service rpcbind status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpcbind
Version: 14
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Steve Dickson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-12 14:21 UTC by Cristian Ciupitu
Modified: 2010-12-17 20:31 UTC (History)
1 user (show)

Fixed In Version: rpcbind-0.2.0-8.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-17 20:31:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for /etc/init.d/rpcbind (211 bytes, patch)
2010-12-12 14:31 UTC, Cristian Ciupitu
no flags Details | Diff

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.


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