def dcast_conf_write(filename, h)
  io = open(filename, "w")
  io.puts "### MASTER CONFIG ###"
  ["eth", "ip_address", "netmask", "network", "broadcast"].each{|i|
    io.puts i.to_s + " = " + h[i].to_s
  }

  io.puts "### CLUSTER CONFIG ###"
  ["prefix", "domain", "swap"].each{|i|
    io.puts i.to_s + " = " + h[i].to_s
  }

  io.puts "### SLAVE CONFIG ###"
  io.puts "#NAME\tIP ADDRESS\tMAC ADDRESS"

  io.close
end

def dcast_conf_buttom_write(filename)
  open(filename, "a"){|io|
    io.puts "### END OF FILE ###"
  }
end

