mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Correctly pass custom env to lxc-attach
lxc-attach doesn't understand commands with environment variables prepended (i.e. "FOO=bar baz") and tells command is not found. Use configured shell to set PATH environment variables and call bootstrap script. Backported from 2015.2.
This commit is contained in:
parent
7fb85f7be1
commit
934bc57c73
1 changed files with 2 additions and 2 deletions
|
@ -2054,8 +2054,8 @@ def bootstrap(name, config=None, approve_key=True,
|
|||
cp(name, cfg_files['pubkey'],
|
||||
os.path.join(configdir, 'minion.pub'))
|
||||
bootstrap_args = bootstrap_args.format(configdir)
|
||||
cmd = ('PATH=$PATH:/bin:/sbin:/usr/sbin'
|
||||
' {0} /tmp/bootstrap.sh {1}').format(
|
||||
cmd = ("{0} -c 'PATH=$PATH:/bin:/sbin:/usr/sbin"
|
||||
" {0} /tmp/bootstrap.sh {1}'").format(
|
||||
bootstrap_shell, bootstrap_args)
|
||||
# log ASAP the forged bootstrap command which can be wrapped
|
||||
# out of the output in case of unexpected problem
|
||||
|
|
Loading…
Add table
Reference in a new issue