diff options
author | Martin Basti <mbasti@redhat.com> | 2016-10-31 13:27:15 +0100 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-11-11 12:13:56 +0100 |
commit | b3786730e50080fa4dadeffa86388592c10b3a62 (patch) | |
tree | e90113f3f21b38d060af3f4f8c1e740641893477 /ipaclient/install/client.py | |
parent | bbad08900bbe8f76e59b159cd2af800f5c089ca1 (diff) | |
download | freeipa-b3786730e50080fa4dadeffa86388592c10b3a62.tar.gz freeipa-b3786730e50080fa4dadeffa86388592c10b3a62.tar.xz freeipa-b3786730e50080fa4dadeffa86388592c10b3a62.zip |
client: move install cleanup from ipa-client-install to module
Cleanup should be part of installation function
https://fedorahosted.org/freeipa/ticket/6392
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaclient/install/client.py')
-rw-r--r-- | ipaclient/install/client.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index 440475b94..4403283f2 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -2286,7 +2286,21 @@ def install_check(options): def install(options): try: - return _install(options) + rval = _install(options) + if rval == CLIENT_INSTALL_ERROR: + if options.force: + root_logger.warning( + "Installation failed. Force set so not rolling back " + "changes.") + elif options.on_master: + root_logger.warning( + "Installation failed. As this is IPA server, changes will " + "not be rolled back.") + else: + root_logger.error("Installation failed. Rolling back changes.") + options.unattended = True + uninstall(options) + return rval finally: try: os.remove(CCACHE_FILE) |