Changes to fix the fqdn
This commit is contained in:
parent
0abb70ee89
commit
13f8313378
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue