lib/testlab/provisioners/hosts_file.rb in testlab-1.22.3 vs lib/testlab/provisioners/hosts_file.rb in testlab-1.22.4
- old
+ new
@@ -48,15 +48,15 @@
tempfile.flush
command = %(/bin/bash -x #{tempfile.path})
@command.exec(command)
- container.bootstrap(script)
+ container.alive? and container.bootstrap(script)
end
def remove_hosts(container)
@command.exec(sed_hostsfile)
- container.exec(sed_hostsfile('linux'))
+ container.alive? and container.exec(sed_hostsfile('linux'))
end
def hosts_blob(container)
blob = Array.new
blob << def_tag