Don't assume that the Firefox autoconfig files exist.

These are created by an object-signing cert and needs to be done
after the fact if a server is created with user-supplied PKCS#12 files.

452402
This commit is contained in:
Rob Crittenden 2008-07-25 16:56:42 -04:00
parent 9f2ee29218
commit cf06dd9f84
2 changed files with 14 additions and 11 deletions

View File

@ -131,6 +131,7 @@ def install_http(config):
http.create_instance(config.realm_name, config.host_name, config.domain_name, False, pkcs12_info) http.create_instance(config.realm_name, config.host_name, config.domain_name, False, pkcs12_info)
# Now copy the autoconfiguration files # Now copy the autoconfiguration files
if ipautil.file_exists(config.dir + "/preferences.html"):
try: try:
shutil.copy(config.dir + "/preferences.html", "/usr/share/ipa/html/preferences.html") shutil.copy(config.dir + "/preferences.html", "/usr/share/ipa/html/preferences.html")
shutil.copy(config.dir + "/configure.jar", "/usr/share/ipa/html/configure.jar") shutil.copy(config.dir + "/configure.jar", "/usr/share/ipa/html/configure.jar")

View File

@ -150,9 +150,11 @@ def save_config(dir, realm_name, host_name, ds_user, domain_name):
def copy_files(realm_name, dir): def copy_files(realm_name, dir):
config_dir = dsinstance.config_dirname(dsinstance.realm_to_serverid(realm_name)) config_dir = dsinstance.config_dirname(dsinstance.realm_to_serverid(realm_name))
try: try:
shutil.copy("/var/kerberos/krb5kdc/ldappwd", dir + "/ldappwd") shutil.copy("/var/kerberos/krb5kdc/ldappwd", dir + "/ldappwd")
shutil.copy("/var/kerberos/krb5kdc/kpasswd.keytab", dir + "/kpasswd.keytab") shutil.copy("/var/kerberos/krb5kdc/kpasswd.keytab", dir + "/kpasswd.keytab")
if ipautil.file_exists("/usr/share/ipa/html/preferences.html"):
shutil.copy("/usr/share/ipa/html/preferences.html", dir + "/preferences.html") shutil.copy("/usr/share/ipa/html/preferences.html", dir + "/preferences.html")
shutil.copy("/usr/share/ipa/html/configure.jar", dir + "/configure.jar") shutil.copy("/usr/share/ipa/html/configure.jar", dir + "/configure.jar")
shutil.copy(config_dir + "/cacert.asc", dir + "/ca.crt") shutil.copy(config_dir + "/cacert.asc", dir + "/ca.crt")