diff options
author | Petr Spacek <pspacek@redhat.com> | 2013-05-15 14:54:11 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2013-05-22 12:29:47 +0200 |
commit | 9fbdf9f51f93acd76e96763501bf9852bc0f8287 (patch) | |
tree | bab64e1b8c0bdd45fe5ec4dda07b1a041a04f525 /ipa-client/ipa-install | |
parent | 89be148580169d9a8dbafa8a72f8c23034e3b601 (diff) | |
download | freeipa-9fbdf9f51f93acd76e96763501bf9852bc0f8287.tar.gz freeipa-9fbdf9f51f93acd76e96763501bf9852bc0f8287.tar.xz freeipa-9fbdf9f51f93acd76e96763501bf9852bc0f8287.zip |
ipa-client-install: Add 'debug' and 'show' statements to nsupdate commands
https://fedorahosted.org/freeipa/ticket/3629
Diffstat (limited to 'ipa-client/ipa-install')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 74523632a..e86564ddd 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -1344,18 +1344,24 @@ def do_nsupdate(update_txt): return result UPDATE_TEMPLATE_A = """ +debug zone $ZONE. update delete $HOSTNAME. IN A +show send update add $HOSTNAME. $TTL IN A $IPADDRESS +show send """ UPDATE_TEMPLATE_AAAA = """ +debug zone $ZONE. update delete $HOSTNAME. IN AAAA +show send update add $HOSTNAME. $TTL IN AAAA $IPADDRESS +show send """ @@ -1446,7 +1452,8 @@ def update_ssh_keys(server, hostname, ssh_dir, create_sshfp): zone = '.'.join(hostname.split('.')[1:]) ttl = 1200 - update_txt = 'zone %s.\nupdate delete %s. IN SSHFP\nsend\n' % (zone, hostname) + update_txt = 'debug\nzone %s.\n' % zone + update_txt += 'update delete %s. IN SSHFP\nshow\nsend\n' % hostname for pubkey in pubkeys: sshfp = pubkey.fingerprint_dns_sha1() if sshfp is not None: @@ -1454,7 +1461,7 @@ def update_ssh_keys(server, hostname, ssh_dir, create_sshfp): sshfp = pubkey.fingerprint_dns_sha256() if sshfp is not None: update_txt += 'update add %s. %s IN SSHFP %s\n' % (hostname, ttl, sshfp) - update_txt += 'send\n' + update_txt += 'show\nsend\n' if not do_nsupdate(update_txt): root_logger.warning("Could not update DNS SSHFP records.") |