Remove CA cert on client uninstall

The CA cert (/etc/ipa/ca.crt) was not being removed
on client uninstall, causing failure on subsequent client
installation in some cases.

https://fedorahosted.org/freeipa/ticket/3537
This commit is contained in:
Ana Krivokapic 2013-04-02 19:48:38 +02:00 committed by Martin Kosek
parent 4a30bf55ac
commit 43fc525fbb

View File

@ -644,6 +644,15 @@ def uninstall(options, env):
root_logger.warning('Please remove /etc/ipa/default.conf manually, '
'as it can cause subsequent installation to fail.')
# Remove the CA cert
try:
os.remove(CACERT)
except OSError, e:
root_logger.warning('%s could not be removed: %s', CACERT, str(e))
root_logger.warning('Please remove %s manually, '
'as it can cause subsequent '
'installation to fail.', CACERT)
root_logger.info("Client uninstall complete.")
# The next block of code prompts for reboot, therefore all uninstall