lib/testlab/container/lxc.rb in testlab-0.4.0 vs lib/testlab/container/lxc.rb in testlab-0.4.1

- old
+ new

@@ -14,13 +14,14 @@ def bootstrap(content) output = nil ZTK::RescueRetry.try(:tries => 3, :on => ContainerError) do tempfile = Tempfile.new("bootstrap") - self.node.ssh.file(:target => File.join(self.lxc.fs_root, tempfile.path), :chmod => '0777', :chown => 'root:root') do |file| + remote_tempfile = File.join("/tmp", File.basename(tempfile.path)) + self.node.ssh.file(:target => File.join(self.lxc.fs_root, remote_tempfile), :chmod => '0777', :chown => 'root:root') do |file| file.puts(content) end - output = self.lxc.attach(%(/bin/bash), tempfile.path) + output = self.lxc.attach(%(/bin/bash), remote_tempfile) if output =~ /No such file or directory/ raise ContainerError, "We could not find the bootstrap file!" end end