From 08b2aa08433d4e4be9764f926fdbec455df3a8ea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Aug 2011 15:47:27 +1000 Subject: 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 --- source4/scripting/bin/samba_dnsupdate | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit