equal
deleted
inserted
replaced
598 else -- posix |
598 else -- posix |
599 local resolv_conf = io.open("/etc/resolv.conf"); |
599 local resolv_conf = io.open("/etc/resolv.conf"); |
600 if resolv_conf then |
600 if resolv_conf then |
601 for line in resolv_conf:lines() do |
601 for line in resolv_conf:lines() do |
602 line = line:gsub("#.*$", "") |
602 line = line:gsub("#.*$", "") |
603 :match('^%s*nameserver%s+([%x:%.]*)%s*$'); |
603 :match('^%s*nameserver%s+([%x:%.]*%%?%S*)%s*$'); |
604 if line then |
604 if line then |
605 local ip = new_ip(line); |
605 local ip = new_ip(line); |
606 if ip then |
606 if ip then |
607 self:addnameserver(ip.addr); |
607 self:addnameserver(ip.addr); |
608 end |
608 end |