Use a more persistent tmp directory

Per FHS, /var/tmp contains temporary files and directories that are not
cleaned up across system reboots. It looks like some commands in the
bootstrap process resulted in "boots" of the LXC inadvertently cleaning
/tmp while its content was still needed. No such problem occurs when
/var/tmp is used.
This commit is contained in:
Gilles Dartiguelongue 2015-07-21 00:30:20 +02:00
parent 96a672f8e0
commit 49cec9f9a1

View file

@ -3190,7 +3190,7 @@ def bootstrap(name,
if needs_install or force_install or unconditional_install:
if install:
rstr = __salt__['test.rand_str']()
configdir = '/tmp/.c_{0}'.format(rstr)
configdir = '/var/tmp/.c_{0}'.format(rstr)
cmd = 'install -m 0700 -d {0}'.format(configdir)
if run(name, cmd, python_shell=False):