Added warning if cert. exists (client)

https://fedorahosted.org/freeipa/ticket/3944
-- 
Martin Basti
>From 934ebe5277005e314fd1ef7fb92525219429b7af Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Tue, 15 Oct 2013 11:31:49 +0200
Subject: [PATCH] Added warning if cert '/etc/ipa/ca.cert' exists

https://fedorahosted.org/freeipa/ticket/3944
---
 ipa-client/ipa-install/ipa-client-install | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 3c78c844b17468f347ef04198d58a12b11e4b4cb..3532584bf7436743bfa4add788b90f05e316fbb7 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -1889,6 +1889,12 @@ def install(options, env, fstore, statestore):
         root_logger.warning("Option 'force-join' has no additional effect "
                             "when used with together with option 'keytab'.")
 
+    # Check if old certificate exist and show warning
+    if get_cert_path(options.ca_cert_file) == CACERT:
+        root_logger.warning("Certificate '%s' exists and will be used. "
+                            "Make sure that certificate is valid (or remove it), "
+                            "otherwise client will not be able to join.", CACERT)
+
     # Create the discovery instance
     ds = ipadiscovery.IPADiscovery()
 
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to