diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-02-24 13:02:27 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-03-03 10:20:39 -0500 |
commit | 5a9a9723deffbeef23248e0f145788c9159b726a (patch) | |
tree | ac59ce087320038a3735921f7874c43e7e55f55d /install | |
parent | 81fd790cda41644d21b9deecdc5c6e3c50155b3d (diff) | |
download | freeipa-5a9a9723deffbeef23248e0f145788c9159b726a.tar.gz freeipa-5a9a9723deffbeef23248e0f145788c9159b726a.tar.xz freeipa-5a9a9723deffbeef23248e0f145788c9159b726a.zip |
IPA replica/server install does not check for a client
When IPA replica or server is configured it does not check for
possibly installed client. This will cause the installation to
fail in the very end.
This patch adds a check for already configured client and suggests
removing it before server/replica installation.
https://fedorahosted.org/freeipa/ticket/1002
Diffstat (limited to 'install')
-rwxr-xr-x | install/tools/ipa-replica-install | 5 | ||||
-rwxr-xr-x | install/tools/ipa-server-install | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install index 590fd645b..17f5cbc37 100755 --- a/install/tools/ipa-replica-install +++ b/install/tools/ipa-replica-install @@ -343,6 +343,11 @@ def main(): if not ipautil.file_exists(filename): sys.exit("Replica file %s does not exist" % filename) + client_fstore = sysrestore.FileStore('/var/lib/ipa-client/sysrestore') + if client_fstore.has_files(): + sys.exit("IPA client is already configured on this system.\n" + + "Please uninstall it first before configuring the replica.") + global sstore sstore = sysrestore.StateFile('/var/lib/ipa/sysrestore') diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 6ae02d893..6fd393362 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -481,6 +481,11 @@ def main(): if (dsinstance.DsInstance().is_configured() or cainstance.CADSInstance().is_configured()) and not options.external_cert_file: sys.exit("IPA server is already configured on this system.") + client_fstore = sysrestore.FileStore('/var/lib/ipa-client/sysrestore') + if client_fstore.has_files(): + sys.exit("IPA client is already configured on this system.\n" + + "Please uninstall it first before configuring the IPA server.") + logging.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options)) logging.debug("missing options might be asked for interactively later\n") |