From f36ab8a16566bc3aec09df4b354315acba5220b7 Mon Sep 17 00:00:00 2001 From: Paul Visscher Date: Mon, 8 Oct 2012 22:12:41 -0400 Subject: [PATCH] Fixes a bug with DNS resolution in Ubuntu 12.10. --- plugins/providers/virtualbox/action/sane_defaults.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/providers/virtualbox/action/sane_defaults.rb b/plugins/providers/virtualbox/action/sane_defaults.rb index 21d8e9055..1ab0b00f7 100644 --- a/plugins/providers/virtualbox/action/sane_defaults.rb +++ b/plugins/providers/virtualbox/action/sane_defaults.rb @@ -29,13 +29,14 @@ module VagrantPlugins begin contents = File.read("/etc/resolv.conf") - if contents =~ /^nameserver 127\.0\.0\.1$/ + if contents =~ /^nameserver 127\.0\.0\.1$/ or + contents =~ /^nameserver 127\.0\.1\.1$/ # The use of both natdnsproxy and natdnshostresolver break on - # Ubuntu 12.04 that uses resolvconf with localhost. When used + # Ubuntu 12.04 and 12.10 that uses resolvconf with localhost. When used # VirtualBox will give the client dns server 10.0.2.3, while # not binding to that address itself. Therefore disable this - # feature if host uses the resolvconf server 127.0.0.1 - @logger.info("Disabling DNS proxy since resolv.conf contains 127.0.0.1") + # feature if host uses the resolvconf server 127.0.0.1 or 127.0.0.1 + @logger.info("Disabling DNS proxy since resolv.conf contains 127.0.0.1 or 127.0.1.1") enable_dns_proxy = false end rescue Errno::ENOENT; end