Whitespace

This commit is contained in:
Mitchell Hashimoto 2013-03-07 11:34:47 -08:00
parent 192c8f59e9
commit cd36088d2f
1 changed files with 8 additions and 8 deletions

View File

@ -10,14 +10,14 @@ module VagrantPlugins
end
def change_host_name(name)
vm.communicate.tap do |comm|
# Only do this if the hostname is not already set
if !comm.test("sudo hostname | grep '#{name}'")
comm.sudo("echo '#{name}' > /etc/HOSTNAME")
comm.sudo("hostname #{name}")
comm.sudo("sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
end
end
vm.communicate.tap do |comm|
# Only do this if the hostname is not already set
if !comm.test("sudo hostname | grep '#{name}'")
comm.sudo("echo '#{name}' > /etc/HOSTNAME")
comm.sudo("hostname #{name}")
comm.sudo("sed -i 's@^\\(127[.]0[.]0[.]1[[:space:]]\\+\\)@\\1#{name} #{name.split('.')[0]} @' /etc/hosts")
end
end
end
end
end