Remove some configuration files we create upon un-installation

This is particularly important for Apache since we'd leave the web
server handling unconfigured locations.
This commit is contained in:
Rob Crittenden 2010-01-28 14:22:50 -05:00
parent 9409b5cf2e
commit bf63cd30a6
2 changed files with 12 additions and 1 deletions

View File

@ -397,6 +397,12 @@ def uninstall(ca = False):
os.remove(ANSWER_CACHE)
except Exception:
pass
# ipa-client-install removes /etc/ipa/default.conf
try:
os.remove("/etc/httpd/conf.d/ipa-rewrite.conf")
os.remove("/etc/httpd/conf.d/ipa.conf")
except:
pass
return 0
@ -624,7 +630,6 @@ def main():
dns_forwarders = ()
# Create the management framework config file and finalize api
fstore.backup_file("/etc/ipa/default.conf")
fd = open("/etc/ipa/default.conf", "w")
fd.write("[global]\n")
fd.write("basedn=" + util.realm_to_suffix(realm_name) + "\n")

View File

@ -140,6 +140,12 @@ def uninstall(options):
print "Reboot command failed to exceute. " + str(e)
sys.exit(1)
# Remove the IPA configuration file
try:
os.remove("/etc/ipa/default.conf")
except:
pass
def configure_ipa_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server):
ipaconf = ipaclient.ipachangeconf.IPAChangeConf("IPA Installer")
ipaconf.setOptionAssignment(" = ")