Diff

net/dns.lua @ 1816:1c0bde3db7d8

Merge with 0.5
author Matthew Wild <mwild1@gmail.com>
date Thu, 24 Sep 2009 11:16:25 +0100
parent 1807:3bb0e5170692
parent 1815:e2f0c514d039
child 1823:7c3ec7ac6316
line wrap: on
line diff
--- a/net/dns.lua	Mon Sep 21 14:46:12 2009 +0100
+++ b/net/dns.lua	Thu Sep 24 11:16:25 2009 +0100
@@ -507,8 +507,8 @@
   local resolv_conf = io.open("/etc/resolv.conf");
   if resolv_conf then
 	  for line in resolv_conf:lines() do
-		local address = string.match (line, 'nameserver%s+(%d+%.%d+%.%d+%.%d+)')
-		if address then  self:addnameserver (address)  end
+		local address = string.match (line, '^%s*nameserver%s+(%d+%.%d+%.%d+%.%d+)')
+		if address then self:addnameserver (address)  end
 	  end
   elseif os.getenv("WINDIR") then
   	self:addnameserver ("208.67.222.222")