guests/gentoo: Exit on hostname error
This commit is contained in:
parent
72dcf610f7
commit
8fe47b79c2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue