Commit b658c67a authored by Jérémie Gaidamour's avatar Jérémie Gaidamour
Browse files

[dev] bindg5k generator - Fixed #7170

parent d33023a2
......@@ -206,13 +206,13 @@ refapi["sites"].each { |site_uid, site|
} # each cluster
#
# Output
#
dns = [] # output file for dns entries
reverse = {} # one hash entry per reverse dns file
local_reverse_list = [] # reverse zone files that include local kavlan (kavlan-1,kavlan-2,kavlan-3).
entries.each { |type, e|
e.each { |entry|
......@@ -221,6 +221,8 @@ refapi["sites"].each { |site_uid, site|
output_file, txt_entry = print_reverse_entry(site_uid, entry) # Reverse DNS
reverse[output_file] ||= []
reverse[output_file] << txt_entry
local_reverse_list << output_file if /.*-kavlan-[1-3]$/.match(entry[:hostsuffix])
}
}
......
......@@ -11,6 +11,7 @@
Dir.entries(zones_dir).sort.each { |file|
next unless /.*.db$/.match(file)
next if /.*-manual\.db/.match(file) # Those files are included in the generated version of the file
next if local_reverse_list.include?(file) # Local reverse zone files are not be included on the global-<site_uid>.conf files (see #7170 -- fixed)
comment = ''
zone = ''
......@@ -21,7 +22,7 @@ Dir.entries(zones_dir).sort.each { |file|
zone = "#{$1}.in-addr.arpa"
comment = '// The following entry was manually added' if !reverse.keys.include?(file)
else
puts "Error: unkown zone for '#{file}' in '#{zones_dir}'"
puts "Error: unknown zone for '#{file}' in '#{zones_dir}'"
next
end
%>
......@@ -32,3 +33,4 @@ Dir.entries(zones_dir).sort.each { |file|
<%= type == 'slave' ? 'masters { master-ns-global; };' : '' %>
};
<% } %>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment