On 14.12.2015 13:41, Jan Cholasta wrote:
Hi,

the attached patch fixes <https://fedorahosted.org/freeipa/ticket/5530>.

Self-NACK, updated patch attached.

--
Jan Cholasta
From fdbe15a0fe488177184b740ab65a57f9166799f7 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Mon, 14 Dec 2015 13:30:33 +0100
Subject: [PATCH] replica promotion: notify user about ignoring client
 enrollment options

When IPA client is already installed, notify the user that the enrollment
options are ignored in ipa-replica-install.

https://fedorahosted.org/freeipa/ticket/5530
---
 ipaserver/install/server/replicainstall.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ipaserver/install/server/replicainstall.py b/ipaserver/install/server/replicainstall.py
index 1d5b528..d62edd1 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -883,6 +883,12 @@ def promote_check(installer):
     client_fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
     if not client_fstore.has_files():
         ensure_enrolled(installer)
+    else:
+        if (options.domain_name or options.server or options.realm_name or
+                options.host_name or options.password or options.keytab):
+            print("IPA client is already configured on this system, ignoring "
+                  "the --domain, --server, --realm, --hostname, --password "
+                  "and --keytab options.")
 
     sstore = sysrestore.StateFile(paths.SYSRESTORE)
 
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to