Commit f182f8a7 authored by Jérome Perrin's avatar Jérome Perrin

slaprunner: factorize $PATH definition

shellinabox shell wrapper, bash's .bashrc, gunicorn environment (which
minishell's inherit) and openssh command should all have the same $PATH
for consistency
parent cc704f71
......@@ -19,7 +19,7 @@ md5sum = 02755403c9f0b52d717160b0b2d0cfb7
[template-runner]
filename = instance-runner.cfg
md5sum = 35fd5b26d70a15bbb0cd04937b7521fa
md5sum = 9a5879e71e842bb343e63fc8ea72251f
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......
......@@ -224,7 +224,7 @@ template = inline:
PasswordAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile $${buildout:directory}/.ssh/authorized_keys
ForceCommand if [ -z "$SSH_ORIGINAL_COMMAND" ]; then ${bash:location}/bin/bash -l; else eval "$SSH_ORIGINAL_COMMAND"; fi
ForceCommand if [ -z "$SSH_ORIGINAL_COMMAND" ]; then ${bash:location}/bin/bash -l; else PATH=$${shell:path} eval "$SSH_ORIGINAL_COMMAND"; fi
Subsystem sftp ${openssh:location}/libexec/sftp-server
[runner-sshd-raw-server]
......@@ -422,7 +422,7 @@ recipe = slapos.cookbook:wrapper
command-line = $${gunicorn:bin_gunicorn} slapos.runner.run:app -p $${gunicorn:path_pid} -b unix:$${gunicorn:socket} -e RUNNER_CONFIG=$${slaprunner:slapos.cfg} --error-logfile $${directory:log}/$${:error-log-file} --timeout 200 --threads 3 --log-level error --preload
error-log-file = gunicorn-error.log
wrapper-path = $${gunicorn:bin_launcher}
environment = PATH=/usr/bin:/bin/:${git:location}/bin/
environment = PATH=$${shell:path}
RUNNER_CONFIG=$${slaprunner:slapos.cfg}
LANG=en_GB.UTF-8
......@@ -645,7 +645,7 @@ recipe = slapos.cookbook:shell
wrapper = $${directory:bin}/bash
shell = ${bash:location}/bin/bash
home = $${buildout:directory}
path = ${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${git:location}/bin:${tig:location}/bin:/usr/bin:/bin/:
path = ${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin:${tig:location}/bin:${zip:location}/bin:/usr/bin:/bin/
ps1 = "\\w> "
[prepare-software]
......@@ -707,7 +707,7 @@ recipe = slapos.recipe.template:jinja2
template = ${template-bash-profile:location}/${template-bash-profile:filename}
rendered = $${buildout:directory}/.bash_profile
context =
raw path $PATH:${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin:${tig:location}/bin:${zip:location}/bin
raw path $PATH:$${shell:path}
key workdir runnerdirectory:home
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment