def GenXinetd(svc="test", disable="no"):
  """Generate xinetd file."""
  defaults = r"""
    defaults
    {
       instances      = 60
       log_type       = SYSLOG     authpriv
       log_on_success = HOST PID
       log_on_failure = HOST
       cps            = 25 30
    }
    includedir /etc/xinetd.d
    """.encode("utf-8")
  tmpl = ("""
    service %s
    {
       disable         = %s
    }
    """ % (svc, disable)).encode("utf-8")
  return {"/etc/xinetd.conf": defaults, "/etc/xinetd.d/%s" % svc: tmpl}