From c3c8651ac1bac794e32b3c01f7e4f6b487dcef08 Mon Sep 17 00:00:00 2001 From: Tomas Babej 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. Reviewed-By: Petr Vobornik --- 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 97f19c7fd..7c5d835ce 100644 --- a/ipaserver/install/server/replicainstall.py +++ b/ipaserver/install/server/replicainstall.py @@ -1461,6 +1461,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"