summaryrefslogtreecommitdiffstats
path: root/ipa-admintools
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-10-16 12:19:43 -0400
committerRob Crittenden <rcritten@redhat.com>2007-10-16 12:19:43 -0400
commit91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4 (patch)
tree04cb4fe4a703b01c43fedfbbda5acc41e7c30d8d /ipa-admintools
parented8f506b0f96d6133899078530d3ff6a63b0c5b6 (diff)
downloadfreeipa-91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4.tar.gz
freeipa-91ab2d3893e1fa3843b38c1b05a6dccbff8a09b4.tar.xz
freeipa-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-findgroup2
-rw-r--r--ipa-admintools/ipa-finduser2
-rw-r--r--ipa-admintools/man/ipa-findgroup.16
-rw-r--r--ipa-admintools/man/ipa-finduser.16
4 files changed, 12 insertions, 4 deletions
diff --git a/ipa-admintools/ipa-findgroup b/ipa-admintools/ipa-findgroup
index 7d5a31668..94a88979d 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 6d2935d99..acbaf44b8 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 29b60797b..decab3df4 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 ab7a01fe0..e08ddc8df 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