pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:278:    if(!server)    {    string domain;   #if __NT__          domain=get_tcpip_param("Domain");    nameservers = ({ get_tcpip_param("NameServer") });    domains=get_tcpip_param("SearchList") / " "- ({""});   #else -  string resolv_conf = Stdio.read_file("/etc/resolv.conf"); +  string resolv_conf; +  foreach(({"/etc/resolv.conf", "/amitcp/db/resolv.conf"}), string resolv_loc) +  if ((resolv_conf = Stdio.read_file(resolv_loc))) +  break;       if (!resolv_conf) {    throw(({ "Protocols.DNS.client(): No /etc/resolv.conf!\n",    backtrace() }));    }       foreach(resolv_conf/"\n", string line)    {    string rest;    sscanf(line,"%s#",line);