Permalink
Browse files

Before accessing the platform_data_dir in the riak startup script, en…

…sure it exists.

Fixes: bz1224
  • Loading branch information...
1 parent 883adf0 commit 918ca87a4a60e09e1940cd29806eabdbffb79431 @jaredmorrow jaredmorrow committed Sep 27, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 rel/files/riak
View
6 rel/files/riak
@@ -10,7 +10,8 @@ RUNNER_ETC_DIR={{runner_etc_dir}}
RUNNER_LOG_DIR={{runner_log_dir}}
PIPE_DIR={{pipe_dir}}
RUNNER_USER={{runner_user}}
-SSL_DIST_CONFIG={{platform_data_dir}}/ssl_distribution.args_file
+PLATFORM_DATA_DIR={{platform_data_dir}}
+SSL_DIST_CONFIG=$PLATFORM_DATA_DIR/ssl_distribution.args_file
# Make sure this script is running as the appropriate user
if [ "$RUNNER_USER" -a "x$LOGNAME" != "x$RUNNER_USER" ]; then
@@ -37,6 +38,9 @@ cd $RUNNER_BASE_DIR
# Make sure log directory exists
mkdir -p $RUNNER_LOG_DIR
+# Make sure the data directory exists
+mkdir -p $PLATFORM_DATA_DIR
+
# Warn the user if they don't have write permissions on the log dir
if [ ! -w $RUNNER_LOG_DIR ]; then
echo "!!!!"

0 comments on commit 918ca87

Please sign in to comment.