From 9f7040d630e20d9d8459f358e4b3b08fcbd9619e Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Fri, 13 Nov 1998 18:29:39 +0100 Subject: [PATCH] Now searches a list of possible locations for resolv.conf. Rev: lib/modules/Protocols.pmod/DNS.pmod:1.28 --- lib/modules/Protocols.pmod/DNS.pmod | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/modules/Protocols.pmod/DNS.pmod b/lib/modules/Protocols.pmod/DNS.pmod index 08172ca7e8..6001a61e97 100644 --- a/lib/modules/Protocols.pmod/DNS.pmod +++ b/lib/modules/Protocols.pmod/DNS.pmod @@ -285,7 +285,10 @@ class client { 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", -- GitLab