plugins/guests/photon/cap/change_host_name.rb in vagrant-unbundled-1.8.4.2 vs plugins/guests/photon/cap/change_host_name.rb in vagrant-unbundled-1.8.5.1

- old
+ new

@@ -3,10 +3,10 @@ module Cap class ChangeHostName def self.change_host_name(machine, name) comm = machine.communicate - if !comm.test("hostname -f | grep -w '#{name}'", sudo: false) + if !comm.test("hostname -f | grep '^#{name}$'", sudo: false) basename = name.split(".", 2)[0] comm.sudo <<-EOH.gsub(/^ {14}/, '') # Set the hostname echo '#{name}' > /etc/hostname hostname '#{name}'