Fix use of undefined cmd when install of boostrap script fails

See PR #25465.
This commit is contained in:
Gilles Dartiguelongue 2015-07-16 08:28:25 +02:00
parent 86118f4a7b
commit 170eb52cc4

View file

@ -3192,9 +3192,8 @@ def bootstrap(name,
rstr = __salt__['test.rand_str']()
configdir = '/tmp/.c_{0}'.format(rstr)
if run(name,
'install -m 0700 -d {0}'.format(configdir),
python_shell=False):
cmd = 'install -m 0700 -d {0}'.format(configdir)
if run(name, cmd, python_shell=False):
log.error('tmpdir {0} creation failed ({1}'
.format(configdir, cmd))
return False