guests/darwin: Exit on error setting hostname

This commit is contained in:
Seth Vargo 2016-06-25 15:22:58 -04:00
parent 7e88266999
commit 619c7a5b26
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,9 @@ module VagrantPlugins
basename = name.split(".", 2)[0]
comm.sudo <<-EOH.gsub(/^ {14}/, '')
set -e
# Set hostname
scutil --set ComputerName '#{name}'
scutil --set HostName '#{name}'