diff options
author | Rob Crittenden <rcritten@redhat.com> | 2007-10-16 12:19:43 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2007-10-16 12:19:43 -0400 |
commit | 91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4 (patch) | |
tree | 04cb4fe4a703b01c43fedfbbda5acc41e7c30d8d /ipa-admintools | |
parent | ed8f506b0f96d6133899078530d3ff6a63b0c5b6 (diff) | |
download | freeipa.git-91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4.tar.gz freeipa.git-91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4.tar.xz freeipa.git-91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4.zip |
Add unique exit status to the ipa-find* tools when nothing is found
Diffstat (limited to 'ipa-admintools')
-rw-r--r-- | ipa-admintools/ipa-findgroup | 2 | ||||
-rw-r--r-- | ipa-admintools/ipa-finduser | 2 | ||||
-rw-r--r-- | ipa-admintools/man/ipa-findgroup.1 | 6 | ||||
-rw-r--r-- | ipa-admintools/man/ipa-finduser.1 | 6 |
4 files changed, 12 insertions, 4 deletions
diff --git a/ipa-admintools/ipa-findgroup b/ipa-admintools/ipa-findgroup index 7d5a3166..94a88979 100644 --- a/ipa-admintools/ipa-findgroup +++ b/ipa-admintools/ipa-findgroup @@ -54,7 +54,7 @@ def main(): groups = groups[1:] if counter == 0: print "No entries found for", args[1] - return 0 + return 2 for ent in groups: attr = ent.attrList() diff --git a/ipa-admintools/ipa-finduser b/ipa-admintools/ipa-finduser index 6d2935d9..acbaf44b 100644 --- a/ipa-admintools/ipa-finduser +++ b/ipa-admintools/ipa-finduser @@ -85,7 +85,7 @@ def main(): users = users[1:] if counter == 0: print "No entries found for", args[1] - return 0 + return 2 for ent in users: attr = ent.attrList() diff --git a/ipa-admintools/man/ipa-findgroup.1 b/ipa-admintools/man/ipa-findgroup.1 index 29b60797..decab3df 100644 --- a/ipa-admintools/man/ipa-findgroup.1 +++ b/ipa-admintools/man/ipa-findgroup.1 @@ -31,4 +31,8 @@ The search is a substring search in the name and description attributes. All entries that match are displayed. .SH "EXIT STATUS" -The exit status is 0 on success, nonzero on error. +0 if one or more entries were found + +1 if an error occurred + +2 if no matching entries were found diff --git a/ipa-admintools/man/ipa-finduser.1 b/ipa-admintools/man/ipa-finduser.1 index ab7a01fe..e08ddc8d 100644 --- a/ipa-admintools/man/ipa-finduser.1 +++ b/ipa-admintools/man/ipa-finduser.1 @@ -37,4 +37,8 @@ Display all attributes .PP By default the full name, home Directory and login shell and username fields are displayed. .SH "EXIT STATUS" -The exit status is 0 on success, nonzero on error. +0 if one or more entries were found + +1 if an error occurred + +2 if no matching entries were found |