Generalized logic for setting up /etc/resolv.conf and /etc/hosts
authorMarc Fiuczynski <mef@cs.princeton.edu>
Fri, 1 Feb 2008 21:03:12 +0000 (21:03 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Fri, 1 Feb 2008 21:03:12 +0000 (21:03 +0000)
commit11f03096d5b8ca4b1b4e407c679c47fd33242b62
tree8eea31e209508d3ca7b540617ad1f6b24e798dce
parent047ec6c390468ad3102f5725e9cebb40b7d81524
Generalized logic for setting up /etc/resolv.conf and /etc/hosts
depending on whether myplc has DNS enabled or not.

If PLC's DNS (dnsmasq) is enabled, then:

1) /etc/resolv.conf will point at the local host and
   /etc/plc_resolv.conf points either at:

  a) the plc-config-tty configured DNS servers, or
  b) the servers specific in the original /etc/resolv.conf

2) /etc/plc_hosts will contain a list of the currently configured
   nodes. (This needs to be fixed, as the set of nodes and their
   network settings can change).

If PLC's DNS (dnsmasq) is disabled, then /etc/resolv.conf will either :
  a) remain untouched if PLC_NET_DNS{1,2} are not specified, or
  b) be backed up to /etc/resolv_plc.backup and a new /etc/resolv.conf
     will be generated with the PLC_NET_DNS{1,2} servers configured by
     plc-config-tty
plc.d/dns