Bug 670596

Summary: return code not explained in ipa help message (ipa man page)
Product: [Retired] freeIPA Reporter: Yi Zhang <yzhang>
Component: ipa-serverAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: 2.0CC: benl, dpal, jgalipea
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: freeipa-2.1.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-27 07:22:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Yi Zhang 2011-01-18 18:35:27 UTC
Description of problem:
<yi> rcrit, a general question: sometimes ipa command returns "2" as error code, what does 2 means?
<rcrit> 2 means not found
<rcrit> yi, can you file a but on this? Return values shoudl be documented in the ipa man page
<rcrit> 0 means ok, 1 means something failed, 2 means not found
<rcrit> note that when doing a user-find and you get nothing that returns a 1. 2 is returned when you ask for a specific entry and it isn't there
<yi> rcrit, ok, got it. 

Version-Release number of selected component (if applicable):ipa-server-2.0-0.2011011115gitc778919.fc14.i686


How reproducible: always


Steps to Reproduce:
1.ipa help user/group/permission/acl/role ....
  

I tried couple ipa commands, and i haven't see return code listed anywhere. I guess all ipa man pages are missing this part.

Comment 1 Dmitri Pal 2011-01-18 20:25:26 UTC
https://fedorahosted.org/freeipa/ticket/803

Comment 2 Rob Crittenden 2011-02-18 20:12:47 UTC
master: 6943acc1615da141d86dc9a84c7f86629199516f

Comment 3 Jenny Severance 2011-06-10 18:46:52 UTC
verified

from man ipa:

<snip>

EXIT STATUS
       0 if the command was successful

       1 if an error occurred

       2 If an entry is not found

</snip>

# rpm -qi ipa-server | head
Name        : ipa-server                   Relocations: (not relocatable)
Version     : 2.0.0                             Vendor: Red Hat, Inc.
Release     : 23.el6                        Build Date: Wed 20 Apr 2011 09:57:13 AM EDT
Install Date: Thu 19 May 2011 12:47:52 PM EDT      Build Host: x86-003.build.bos.redhat.com
Group       : System Environment/Base       Source RPM: ipa-2.0.0-23.el6.src.rpm
Size        : 2565882                          License: GPLv3+
Signature   : RSA/8, Thu 21 Apr 2011 03:48:25 PM EDT, Key ID 199e2f91fd431d51
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://www.freeipa.org/
Summary     : The IPA authentication server