Project

General

Profile

« Previous | Next » 

Revision 5c60cc29

Added by Marc Dequènes over 13 years ago

  • ID 5c60cc29c70bd2ca0f265ef1400cd0e4d3046f40

[fix] DNS service fixes

View differences:

lib/cyborghood/services/dns.rb
end
def save_to_temp
return unless temp_file.nil?
return unless @temp_file.nil?
begin
@temp_file = Tempfile.new(@zone)
......
raise CyberError.new(:unrecoverable, "services/dns", "zone '#{@zone}' could not be checked (I/O error)")
end
if $?.success?
serial = nil
messages = []
output.each do |l|
next if l == "OK"
if l =~ /: loaded serial (\d+)$/
serial = $1
next
end
messages << l
serial = nil
messages = []
output.each do |l|
next if l == "OK"
if l =~ /: loaded serial (\d+)$/
serial = $1
next
end
messages << l
end
if $?.success?
if serial
return {:ok => true, :serial => serial, :warnings => messages}.to_ostruct
else

Also available in: Unified diff