Bug 510774
| Summary: | pkisilent returns 0 on errors | ||
|---|---|---|---|
| Product: | [Retired] Dogtag Certificate System | Reporter: | Rob Crittenden <rcritten> |
| Component: | Scripts | Assignee: | Ade Lee <alee> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Chandrasekar Kannan <ckannan> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 1.1 | CC: | aakkiang, alee, awnuk, benl, cfu, jgalipea, jmagne |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-06-04 19:59:09 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: | 431020, 431022, 445047 | ||
|
Description
Rob Crittenden
2009-07-10 17:49:43 UTC
Simple patch to fix.
Index: scripts/pkisilent
===================================================================
--- scripts/pkisilent (revision 876)
+++ scripts/pkisilent (working copy)
@@ -157,7 +157,15 @@
###############################################################################
my $output = `java -cp $ENV{CLASSPATH} @ARGV`;
+my $status = $?;
print "#######################################################################\n";
print "$output\n";
print "#######################################################################\n";
+
+if ($status != 0) {
+ exit(255);
+} else {
+ exit(0);
+}
+
Attachments id=375817 id=375819 jmagne+ With caveat of checking for an empty string in the function: checkRequireArgs. Checked in as part of fixes to 504030: Checked into tip: [builder@dhcp231-70 silent]$ svn ci -m "fixes for BZ 510774,531162,504030, 493418" Sending silent/scripts/pkisilent Sending silent/src/argparser/ArgParser.java Sending silent/src/ca/ConfigureCA.java Sending silent/src/common/ComCrypto.java Sending silent/src/drm/ConfigureDRM.java Sending silent/src/ocsp/ConfigureOCSP.java Sending silent/src/subca/ConfigureSubCA.java Sending silent/src/tks/ConfigureTKS.java Sending silent/src/tps/ConfigureTPS.java Transmitting file data ......... Committed revision 877. Checked into 8.1 [builder@oliver silent]$ svn ci -m "fixes for BZ 510774,531162, 504030, 493418" Sending silent/scripts/pkisilent Sending silent/src/argparser/ArgParser.java Sending silent/src/ca/ConfigureCA.java Sending silent/src/drm/ConfigureDRM.java Sending silent/src/ocsp/ConfigureOCSP.java Sending silent/src/subca/ConfigureSubCA.java Sending silent/src/tks/ConfigureTKS.java Sending silent/src/tps/ConfigureTPS.java Transmitting file data ........ Committed revision 878. Note to docs/ QE: This is easy to test. See description. You should be able to invoke pkisilent and check status with echo $? You should get 0 for success, and non-zero for any errors. Tested pkisilent for CA, KRA, OCSP, RA, TKS and CA clone, returns 0 when success and non zero for failures. Marking the bug verified. |