Пример #1
0
def configure_localhost():
  app.print_verbose("Configure /etc/hosts")
  localhost =  (
  	"127.0.0.1" +
  	" %s.%s" % (gethostname(), general.get_resolv_domain()) +
  	" localhost.localdomain localhost %s" % gethostname()
  )
  scOpen("/etc/hosts").replace_add("127.0.0.1.*", localhost)
Пример #2
0
def configure_localhost():
    app.print_verbose("Configure /etc/hosts")
    localhost = ("127.0.0.1" + " %s.%s" %
                 (gethostname(), general.get_resolv_domain()) +
                 " localhost.localdomain localhost %s" % gethostname())
    scOpen("/etc/hosts").replace_add("127.0.0.1.*", localhost)
Пример #3
0
def configure_resolv_conf():
    app.print_verbose("Configure /etc/resolv.conf")
    resolv = scOpen("/etc/resolv.conf")
    resolv.replace_add("domain.*", "domain " + general.get_resolv_domain())
    resolv.replace_add("search.*", "search " + general.get_resolv_search())
Пример #4
0
def configure_resolv_conf():
  app.print_verbose("Configure /etc/resolv.conf")
  resolv = scOpen("/etc/resolv.conf")
  resolv.replace_add("domain.*", "domain " + general.get_resolv_domain())
  resolv.replace_add("search.*", "search " + general.get_resolv_search())