summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-03-23 14:49:48 +0100
committerMartin Kosek <mkosek@redhat.com>2011-04-28 10:02:18 +0200
commit8472dc26b7e261090b73e0dba488df23917830fa (patch)
tree2537ea3064d5b1f80ecd9572576ee033fb6a301a /ipa-client
parent98eefab5e15c4a01f0887c4c68cbe10b5cdaab84 (diff)
downloadfreeipa-8472dc26b7e261090b73e0dba488df23917830fa.tar.gz
freeipa-8472dc26b7e261090b73e0dba488df23917830fa.tar.xz
freeipa-8472dc26b7e261090b73e0dba488df23917830fa.zip
Log temporary files in ipa-client-install
This patch adds logging of temporary files (Kerberos configuration, nsupdate commands) that may be very useful for debugging purposes. https://fedorahosted.org/freeipa/ticket/1093 https://fedorahosted.org/freeipa/ticket/1094
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install9
1 files changed, 8 insertions, 1 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index ca96e86f5..c409fe706 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -477,6 +477,9 @@ def configure_krb5_conf(fstore, cli_basedn, cli_realm, cli_domain, cli_server, d
appopts = [{'name':'pam', 'type':'subsection', 'value':pamopts}]
opts.append({'name':'appdefaults', 'type':'section', 'value':appopts})
+ logging.debug("Writing Kerberos configuration to %s:\n%s"
+ % (filename, krbconf.dump(opts)))
+
krbconf.newConf(filename, opts);
return 0
@@ -616,6 +619,10 @@ def update_dns(server, hostname):
return
update_txt = ipautil.template_str(template, sub_dict)
+
+ logging.debug("Writing nsupdate commands to %s:\n%s"
+ % (UPDATE_FILE, update_txt))
+
update_fd = file(UPDATE_FILE, "w")
update_fd.write(update_txt)
update_fd.flush()
@@ -628,7 +635,7 @@ def update_dns(server, hostname):
print >>sys.stderr, "Failed to obtain host TGT."
try:
- ipautil.run(['/usr/bin/nsupdate', '-g', "/etc/ipa/.dns_update.txt"],
+ ipautil.run(['/usr/bin/nsupdate', '-g', UPDATE_FILE],
env={'KRB5CCNAME':CCACHE_FILE})
print "DNS server record set to: %s -> %s" % (hostname, ip)
except CalledProcessError, e: