diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-24 15:47:27 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-08-25 07:39:39 +1000 |
commit | 08b2aa08433d4e4be9764f926fdbec455df3a8ea (patch) | |
tree | 0bc7e8c370a1be62beca831b8026bc4e8860cab0 | |
parent | 345220b762af62b071faf9d9b352e928dfe1c375 (diff) | |
download | samba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.tar.gz samba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.tar.bz2 samba-08b2aa08433d4e4be9764f926fdbec455df3a8ea.zip |
s4-dns: cope with duplicate entries in dns_update_list
this is needed for when DNSFOREST and DNSDOMAIN are the same
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | source4/scripting/bin/samba_dnsupdate | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate index 9609fe992b..26c1124fbd 100755 --- a/source4/scripting/bin/samba_dnsupdate +++ b/source4/scripting/bin/samba_dnsupdate @@ -390,6 +390,8 @@ sub_vars = get_subst_vars() update_list = [] dns_list = [] +dup_set = set() + # read each line, and check that the DNS name exists for line in file: line = line.strip() @@ -400,7 +402,9 @@ for line in file: continue if d.type == 'AAAA' and len(IP6s) == 0: continue - dns_list.append(d) + if str(d) not in dup_set: + dns_list.append(d) + dup_set.add(str(d)) # now expand the entries, if any are A record with ip set to $IP # then replace with multiple entries, one for each interface IP |