Hello James W. Mills,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/26236
to review the following change.
Change subject: Fix typo and use default cert
......................................................................
Fix typo and use default cert
This script has a typo that prevents successful execution. In
addition, the usage section describes defaulting to a default
certificate, but that logic does not exist in the script. The script
is updated to:
* Change ENIGNE to ENGINE
* Handle the default cert
* Exit if default cert does not exist and no cert specified
* Exit if specified cert does not exist
Change-Id: I4b04c74ccc62664ead27339566e540bdd717eb71
Bug-Url: https://bugzilla.redhat.com/1082506
Signed-off-by: James W. Mills <[email protected]>
Signed-off-by: Eli Mesika <[email protected]>
---
M packaging/dbscripts/encryptionvalidator.sh
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/26236/1
diff --git a/packaging/dbscripts/encryptionvalidator.sh
b/packaging/dbscripts/encryptionvalidator.sh
index 8d1e310..77c036e 100755
--- a/packaging/dbscripts/encryptionvalidator.sh
+++ b/packaging/dbscripts/encryptionvalidator.sh
@@ -86,7 +86,7 @@
d) DATABASE=$OPTARG;;
u) USERNAME=$OPTARG;;
l) LOGFILE=$OPTARG;;
- c) ENIGNE_CERTIFICATE=$OPTARG;;
+ c) ENGINE_CERTIFICATE=$OPTARG;;
f) FIXIT=true;;
v) VERBOSE=true;;
h) ret=0 && usage;;
@@ -95,7 +95,16 @@
done
if [[ -z "${ENGINE_CERTIFICATE}" ]]; then
- echo "Engine certificate was not set"
+ #Use default specified in usage
+ if [[ -e /etc/pki/ovirt-engine/certs/engine.cer ]]; then
+ echo "Using default engine certificate
/etc/pki/ovirt-engine/certs/engine.cer"
+ ENGINE_CERTIFICATE=/etc/pki/ovirt-engine/certs/engine.cer
+ else
+ echo "Engine certificate was not set and default certificate does not
exist."
+ exit 1
+ fi
+elif [[ ! -e ${ENGINE_CERTIFICATE} ]]; then
+ echo "Supplied Engine certificate \"${ENGINE_CERTIFICATE}\" does not
exist."
exit 1
fi
--
To view, visit http://gerrit.ovirt.org/26236
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b04c74ccc62664ead27339566e540bdd717eb71
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Eli Mesika <[email protected]>
Gerrit-Reviewer: James W. Mills <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches