Commit 2118a01c authored by Jérome Perrin's avatar Jérome Perrin

slaprunner: ~/bin/slapos: don't override SLAPOS_CONFIGURATION

Because this slapos often is executed when just running `slapos` at is
in the $PATH, we should also consider special cases where users want to
call this script with another $SLAPOS_CONFIGURATION.

When $SLAPOS_CONFIGURATION is already set, ~/bin/slapos will not change
it, it will only set it when not set.
parent 06c1f15d
......@@ -78,4 +78,4 @@ md5sum = 2451072826a9ad9425d62c9e9c7f6284
[template-slapuser-script]
filename = template/slapos-slapuser-script.in
md5sum = becafae59ab9973724e0edb238f4cb7a
md5sum = 2e5fdd6e8e07429f83a38b148b2f1cb0
#!/bin/sh
# run slapos command inside slaprunner with appropriate config
SLAPOS_CONFIGURATION={{ config_location }} \
SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION \
export SLAPOS_CONFIGURATION=${SLAPOS_CONFIGURATION-"{{ config_location }}"}
export SLAPOS_CLIENT_CONFIGURATION=${SLAPOS_CLIENT_CONFIGURATION-$SLAPOS_CONFIGURATION}
exec {{ slapos_python_file_location }} "$@"
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