summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-10-14 11:29:35 -0400
committerRob Crittenden <rcritten@redhat.com>2011-10-13 20:44:49 -0400
commit1104a8898ca6d4e46f3671245703fe1ca8b40ec5 (patch)
tree6fd2a5a9c87f9bb03f5a8b677af8eda8d38ac62c
parentcc0e30a1bbab1ee9823a1a80fe75654df2049a47 (diff)
downloadfreeipa-1104a8898ca6d4e46f3671245703fe1ca8b40ec5.tar.gz
freeipa-1104a8898ca6d4e46f3671245703fe1ca8b40ec5.tar.xz
freeipa-1104a8898ca6d4e46f3671245703fe1ca8b40ec5.zip
Update all LDAP configuration files that we can.
LDAP can be configured in any number of places, we need to update everything we find. https://fedorahosted.org/freeipa/ticket/1986
-rwxr-xr-xipa-client/ipa-install/ipa-client-install7
1 files changed, 5 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index d6e48c5d8..86e19e455 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -459,6 +459,7 @@ def configure_ldap_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, d
opts.append({'name':'empty', 'type':'empty'})
ret = (0, None, None)
+ files = []
# Depending on the release and distribution this may exist in any
# number of different file names, update what we find
for filename in ['/etc/ldap.conf', '/etc/nss_ldap.conf', '/etc/libnss-ldap.conf', '/etc/pam_ldap.conf']:
@@ -466,11 +467,13 @@ def configure_ldap_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, d
try:
fstore.backup_file(filename)
ldapconf.newConf(filename, opts)
- return (0, 'LDAP', filename)
+ files.append(filename)
except Exception, e:
print "Creation of %s: %s" % (filename, str(e))
return (1, 'LDAP', filename)
+ if files:
+ return (0, 'LDAP', ', '.join(files))
return ret
def configure_nslcd_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options):
@@ -1186,7 +1189,7 @@ def install(options, env, fstore, statestore):
if retcode:
return CLIENT_INSTALL_ERROR
if conf:
- print "%s configured using configuration file %s" % (conf, filename)
+ print "%s configured using configuration file(s) %s" % (conf, filename)
#Check that nss is working properly
if not options.on_master: