guests/freebsd: Check FQDN for hostname

This commit is contained in:
Seth Vargo 2016-06-22 18:33:39 -07:00
parent 57774601d9
commit ea9b28f9b6
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ module VagrantPlugins
options = { shell: "sh" }
comm = machine.communicate
if !comm.test("hostname -f | grep -w '#{name}' || hostname -s | grep -w '#{name}'", options)
if !comm.test("hostname -f | grep '^#{name}$'", options)
basename = name.split(".", 2)[0]
command = <<-EOH.gsub(/^ {14}/, '')
# Set the hostname