Project

General

Profile

« Previous | Next » 

Revision 18a0cb41

Added by Ohad Levy over 13 years ago

  • ID 18a0cb41f5ae9929b7b29c3fb17bb4625af55f3a

Added more error messages to nsupdate
based on pikelly patches

View differences:

lib/proxy/dns/bind.rb
if cmd == "connect"
@om = IO.popen("/usr/bin/nsupdate -k #{SETTINGS.dns_key}", "r+")
@om.puts "server #{@server}"
elsif
cmd == "disconnect"
elsif cmd == "disconnect"
@om.puts "send"
@om.puts "answer"
@om.close_write
......
@om.close
@om = nil # we cannot serialize an IO obejct, even if closed.
# TODO Parse output for errors!
return true
if status.empty?
logger.debug "nsupdate returned no status!"
false
elsif status[1] !~ /status: NOERROR/
logger.debug "nsupdate: errors\n" + status.join("\n")
false
else
true
end
else
logger.debug "nsupdate: executed - #{cmd}"
@om.puts cmd

Also available in: Unified diff