Create /etc/ipa/ipa.conf earlier in the installation process.

Because the ipa.config() object raises an error if there is no configuration
file and auto-detection fails, ipa_webgui may fail to start at install time.

440475
This commit is contained in:
Rob Crittenden 2008-04-03 15:49:07 -04:00
parent 8dafa9dc92
commit a761093a30

View File

@ -486,6 +486,14 @@ def main():
http = ipaserver.httpinstance.HTTPInstance(fstore)
http.create_instance(realm_name, host_name, domain_name)
# Create the config file
fstore.backup_file("/etc/ipa/ipa.conf")
fd = open("/etc/ipa/ipa.conf", "w")
fd.write("[defaults]\n")
fd.write("server=" + host_name + "\n")
fd.write("realm=" + realm_name + "\n")
fd.close()
# Create a Web Gui instance
webgui = ipaserver.httpinstance.WebGuiInstance()
webgui.create_instance()
@ -515,14 +523,6 @@ def main():
# Set the admin user kerberos password
ds.change_admin_password(admin_password)
# Create the config file
fstore.backup_file("/etc/ipa/ipa.conf")
fd = open("/etc/ipa/ipa.conf", "w")
fd.write("[defaults]\n")
fd.write("server=" + host_name + "\n")
fd.write("realm=" + realm_name + "\n")
fd.close()
# Call client install script
try:
run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name])