mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
parent
8dafa9dc92
commit
a761093a30
@ -486,6 +486,14 @@ def main():
|
|||||||
http = ipaserver.httpinstance.HTTPInstance(fstore)
|
http = ipaserver.httpinstance.HTTPInstance(fstore)
|
||||||
http.create_instance(realm_name, host_name, domain_name)
|
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
|
# Create a Web Gui instance
|
||||||
webgui = ipaserver.httpinstance.WebGuiInstance()
|
webgui = ipaserver.httpinstance.WebGuiInstance()
|
||||||
webgui.create_instance()
|
webgui.create_instance()
|
||||||
@ -515,14 +523,6 @@ def main():
|
|||||||
# Set the admin user kerberos password
|
# Set the admin user kerberos password
|
||||||
ds.change_admin_password(admin_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
|
# Call client install script
|
||||||
try:
|
try:
|
||||||
run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name])
|
run(["/usr/sbin/ipa-client-install", "--on-master", "--unattended", "--domain", domain_name, "--server", host_name, "--realm", realm_name])
|
||||||
|
Loading…
Reference in New Issue
Block a user