summaryrefslogtreecommitdiffstats
path: root/ipaclient/install/client.py
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-10-31 09:35:09 +0100
committerJan Cholasta <jcholast@redhat.com>2016-11-11 12:13:56 +0100
commitfcea3b3fb88ede0e9414f83ac2372e000e728587 (patch)
tree6bfed9f94d9607217c7bee91dc652f2fc3e1813d /ipaclient/install/client.py
parent3f690a0a3a7e039183eca1578a3cb13f2c0632ef (diff)
downloadfreeipa-fcea3b3fb88ede0e9414f83ac2372e000e728587.tar.gz
freeipa-fcea3b3fb88ede0e9414f83ac2372e000e728587.tar.xz
freeipa-fcea3b3fb88ede0e9414f83ac2372e000e728587.zip
client: extract checks from uninstall to uninstall_check
Checks if uninstallation is possible should be moved to uninstall_check 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.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py
index eaef0c896..878bb04b0 100644
--- a/ipaclient/install/client.py
+++ b/ipaclient/install/client.py
@@ -2867,9 +2867,8 @@ def install(options, env):
return SUCCESS
-def uninstall(options, env):
+def uninstall_check(options):
fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
- statestore = sysrestore.StateFile(paths.IPA_CLIENT_SYSRESTORE)
if not is_ipa_client_installed(fstore):
root_logger.error("IPA client is not configured on this system.")
@@ -2882,6 +2881,13 @@ def uninstall(options, env):
root_logger.info("Refer to ipa-server-install for uninstallation.")
return CLIENT_NOT_CONFIGURED
+ return SUCCESS
+
+
+def uninstall(options, env):
+ fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE)
+ statestore = sysrestore.StateFile(paths.IPA_CLIENT_SYSRESTORE)
+
try:
run(["ipa-client-automount", "--uninstall", "--debug"])
except Exception as e: