From 13f831337805c56ba27d34021126fffb4cdb4c7f Mon Sep 17 00:00:00 2001 From: Chris Beauchamp Date: Mon, 7 Feb 2011 16:59:34 +0000 Subject: [PATCH] Changes to fix the fqdn --- lib/vagrant/systems/debian.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/vagrant/systems/debian.rb b/lib/vagrant/systems/debian.rb index 674ec1ff8..1914a28f6 100644 --- a/lib/vagrant/systems/debian.rb +++ b/lib/vagrant/systems/debian.rb @@ -26,6 +26,7 @@ module Vagrant vm.ssh.execute do |ssh| if !ssh.test?("sudo hostname | grep '#{name}'") ssh.exec!("sudo sed -i 's/.*$/#{name}/' /etc/hostname") + ssh.exec!("sudo sed -i 's@^\\(127[.]0[.]1[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts") ssh.exec!("sudo service hostname start") end end