riak2: use sensible default paths
Make exporting the RIAK_{ETC,LOG,DATA}_DIR variables optional; if they're not in the environment, we use the same default values as NixOS.
This commit is contained in:
parent
5ef9a427cf
commit
878e69c67c
|
@ -16,6 +16,6 @@ import ./make-test.nix {
|
|||
|
||||
$master->waitForUnit("riak");
|
||||
$master->sleep(20); # Hopefully this is long enough!!
|
||||
$master->succeed("RIAK_DATA_DIR='/var/db/riak' RIAK_LOG_DIR='/var/log/riak' RIAK_ETC_DIR='/etc/riak' riak ping 2>&1");
|
||||
$master->succeed("riak ping 2>&1");
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postPatch = ''
|
||||
sed -i deps/node_package/priv/base/env.sh \
|
||||
-e 's@{{platform_data_dir}}@$RIAK_DATA_DIR@' \
|
||||
-e 's@{{platform_data_dir}}@''${RIAK_DATA_DIR:-/var/db/riak}@' \
|
||||
-e 's@^RUNNER_SCRIPT_DIR=.*@RUNNER_SCRIPT_DIR='$out'/bin@' \
|
||||
-e 's@^RUNNER_BASE_DIR=.*@RUNNER_BASE_DIR='$out'@' \
|
||||
-e 's@^RUNNER_ETC_DIR=.*@RUNNER_ETC_DIR=$RIAK_ETC_DIR@' \
|
||||
-e 's@^RUNNER_LOG_DIR=.*@RUNNER_LOG_DIR=$RIAK_LOG_DIR@'
|
||||
-e 's@^RUNNER_ETC_DIR=.*@RUNNER_ETC_DIR=''${RIAK_ETC_DIR:-/etc/riak}@' \
|
||||
-e 's@^RUNNER_LOG_DIR=.*@RUNNER_LOG_DIR=''${RIAK_LOG_DIR:-/var/log}@'
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
|
|
Loading…
Reference in a new issue