Changes to fix the fqdn

This commit is contained in:
Chris Beauchamp 2011-02-07 16:59:34 +00:00 committed by Mitchell Hashimoto
parent 0abb70ee89
commit 13f8313378
1 changed files with 1 additions and 0 deletions

View File

@ -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