guests/gentoo: Exit on hostname error

This commit is contained in:
Seth Vargo 2016-06-26 11:40:41 -04:00
parent 72dcf610f7
commit 8fe47b79c2
No known key found for this signature in database
GPG Key ID: 905A90C2949E8787
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ module VagrantPlugins
if !comm.test("hostname -f | grep '^#{name}$'", sudo: false)
basename = name.split(".", 2)[0]
comm.sudo <<-EOH.gsub(/^ {14}/, "")
set -e
# Set the hostname
hostname '#{basename}'
echo "hostname=#{basename}" > /etc/conf.d/hostname