Commit 06c1f15d authored by Jérome Perrin's avatar Jérome Perrin

slaprunner: set $HOME

Because slaprunner might be instanciated in a different directory than
the shell user $HOME (like in recursive SlapOS), it's necessary to set
HOME to the base directory. For "bare metal" SlapOS, this would not make
any difference.
parent d74eb583
......@@ -18,7 +18,7 @@ md5sum = c44a7481bb85e3258128afe3fcf23f44
[template-runner]
filename = instance-runner.cfg
md5sum = 7529924d81c0d06c73b2f87b00bb8d05
md5sum = 159f051d4a07428cb5a7069a9ccd10d3
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
......@@ -58,7 +58,7 @@ md5sum = f8446fcf254b4929eb828a9a1d7e5f62
[template-bash-profile]
filename = template/bash_profile.in
md5sum = 703bb29604843774797dd246e67a4a52
md5sum = 7645048216fcf957f7773534cd0408dc
[template-supervisord]
filename = template/supervisord.conf.in
......
......@@ -261,7 +261,7 @@ template = inline:
PasswordAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile $${buildout:directory}/.ssh/authorized_keys
ForceCommand if [ -z "$SSH_ORIGINAL_COMMAND" ]; then $${shell-environment:shell} -l; else SHELL=$${shell-environment:shell} PATH=$${shell-environment:path} eval "$SSH_ORIGINAL_COMMAND"; fi
ForceCommand cd $${directory:home}; if [ -z "$SSH_ORIGINAL_COMMAND" ]; then HOME=$${directory:home} $${shell-environment:shell} -l; else HOME=$${directory:home} SHELL=$${shell-environment:shell} PATH=$${shell-environment:path} eval "$SSH_ORIGINAL_COMMAND"; fi
Subsystem sftp ${openssh:location}/libexec/sftp-server
[runner-sshd-raw-server]
......@@ -780,6 +780,7 @@ context =
key terminfo terminfo:location
key instance_name slap-parameter:instance-name
key workdir runnerdirectory:home
key home directory:home
[terminfo]
location = ${ncurses:location}/share/terminfo/
......
......@@ -3,6 +3,7 @@
# If you want to load your custom bash configuration, please use a .bashrc file
cd {{ workdir }}
export HOME={{- home }}
export PATH={{- path }}
export SHELL={{- shell }}
{%- if instance_name %}
......
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