Hi,

Avoids failing in the later stages during the ipa-client-install
command.

Tomas
From 477a9a197524ff39373f5e58cf7c7ee173657c91 Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Fri, 4 Dec 2015 19:13:07 +0100
Subject: [PATCH] replicainstall: Add check for domain if server is specified

Avoids failing in the later stages during the ipa-client-install
command.
---
 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 ec77ab21b1e4969bdcd8d9e588eed7b97e3a9079..4ab40256d15bbd534e910c0ca008bb79a15b268b 100644
--- a/ipaserver/install/server/replicainstall.py
+++ b/ipaserver/install/server/replicainstall.py
@@ -1353,6 +1353,12 @@ class Replica(BaseServer):
                 raise RuntimeError("--dirsrv-cert-file and --http-cert-file "
                                    "are required if any PKCS#12 options are "
                                    "used")
+
+            if self.server and not self.domain_name:
+                raise RuntimeError("The --server option cannot be used "
+                                   "without providing domain via the --domain "
+                                   "option")
+
         else:
             if not ipautil.file_exists(self.replica_file):
                 raise RuntimeError("Replica file %s does not exist"
-- 
2.5.0

-- 
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