mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Error out if configdir could not be created when preparing LXC container
This commit is contained in:
parent
41b6c3c2bf
commit
978e6d56e2
1 changed files with 7 additions and 2 deletions
|
@ -3191,9 +3191,14 @@ def bootstrap(name,
|
|||
if install:
|
||||
rstr = __salt__['test.rand_str']()
|
||||
configdir = '/tmp/.c_{0}'.format(rstr)
|
||||
run(name,
|
||||
|
||||
if run(name,
|
||||
'install -m 0700 -d {0}'.format(configdir),
|
||||
python_shell=False)
|
||||
python_shell=False):
|
||||
log.error('tmpdir {0} creation failed ({1}'
|
||||
.format(configdir, cmd))
|
||||
return False
|
||||
|
||||
bs_ = __salt__['config.gather_bootstrap_script'](
|
||||
bootstrap=bootstrap_url)
|
||||
dest_dir = os.path.join('/tmp', rstr)
|
||||
|
|
Loading…
Add table
Reference in a new issue