summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install25
1 files changed, 24 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 9a8600d55..4b8d826dd 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -195,6 +195,16 @@ def uninstall(options, env):
root_logger.info("Refer to ipa-server-install for uninstallation.")
return CLIENT_NOT_CONFIGURED
+ try:
+ run(["ipa-client-automount", "--uninstall", "--debug"])
+ except Exception, e:
+ root_logger.error(
+ "Unconfigured automount client failed: %s", str(e))
+
+ # Reload the state as automount unconfigure may have modified it
+ fstore._load()
+ statestore._load()
+
hostname = None
was_sssd_configured = False
try:
@@ -442,6 +452,19 @@ def uninstall(options, env):
"Reboot command failed to exceute: %s", str(e))
return CLIENT_UNINSTALL_ERROR
+ rv = 0
+
+ if fstore.has_files():
+ root_logger.error('Some files have not been restored, see /var/lib/ipa-client/sysrestore/sysrestore.index')
+ has_state = False
+ for module in statestore.modules.keys():
+ root_logger.error('Some installation state for %s has not been restored, see /var/lib/ipa/sysrestore/sysrestore.state' % module)
+ has_state = True
+ rv = 1
+
+ if has_state:
+ root_logger.warning('Some installation state has not been restored.\nThis may cause re-installation to fail.\nIt should be safe to remove /var/lib/ipa-client/sysrestore.state but it may\nmean your system hasn\'t be restored to its pre-installation state.')
+
# Remove the IPA configuration file
try:
os.remove("/etc/ipa/default.conf")
@@ -450,7 +473,7 @@ def uninstall(options, env):
root_logger.info("Client uninstall complete.")
- return 0
+ return rv
def configure_ipa_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server):
ipaconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer")