240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
# File 'lib/bosh_agent/bootstrap.rb', line 240
def setup_tmp
agent_tmp_dir = File.join(base_dir, 'data', 'tmp')
FileUtils.mkdir_p(agent_tmp_dir)
ENV["TMPDIR"] = agent_tmp_dir
tmp_permissions
unless Pathname.new('/tmp').mountpoint?
tmp_size = 128
root_tmp = File.join(base_dir, 'data', 'root_tmp')
%x[/usr/bin/truncate -s #{tmp_size}M #{root_tmp}]
%x[chmod 0700 #{root_tmp}]
%x[mke2fs -t ext4 -m 1 -F #{root_tmp}]
%x[mount -t ext4 -o loop #{root_tmp} /tmp]
tmp_permissions
end
end
|