Bug 523177

Summary: Initscript: ipmidetectd incorrect exit codes
Product: [Fedora] Fedora Reporter: Petr Šplíchal <psplicha>
Component: freeipmiAssignee: Jan Safranek <jsafrane>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jsafrane, ohudlick, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freeipmi-0.7.12-3.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-14 13:54:32 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:
Bug Depends On:    
Bug Blocks: 521669    

Description Petr Šplíchal 2009-09-14 11:45:35 UTC
Description of problem:

The ipmidetectd initscript does not report correct exit status as
specified in the Fedora Initscript Guidelines:

Version-Release number of selected component (if applicable):
freeipmi-ipmidetectd-0.7.9-1.fc12.i586


When ipmidetectd is stopped the initscript should return 3:

Steps to Reproduce:
# service freeipmi-ipmidetectd stop
# service freeipmi-ipmidetectd status
ipmidetectd is stopped
# echo $?
  
Actual results: 0
Expected results: 3

https://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action


When configuration file is not present, 6 should be returned:

Steps to Reproduce:
# rm /etc/ipmidetectd.conf
# service freeipmi-ipmidetectd start
Starting ipmidetectd: ipmidetectd: No nodes configured
# echo $?

Actual results: 1
Expected results: 6

https://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_non-Status_Actions

Comment 1 Petr Šplíchal 2009-09-14 13:41:59 UTC
Supplying a non-supported option should result in status 2:
2 invalid or excess argument(s)

FAIL :: Running 'service freeipmi-ipmidetectd' (Expected 2, got 1)
FAIL :: Running 'service freeipmi-ipmidetectd nothing' (Expected 2, got 1)