[
 %% Riak Core config
 {riak_core, [
<%= @config[:core].map{|c| "\t#{c}"}.join(",\n") %>
	]},
 %% Riak KV config
 {riak_kv, [
<%= @config[:kv].map{|c| "\t#{c}"}.join(",\n") %><% unless @storage_backend.eql?("innostore") %>,
<%= @config[:storage_backend_options].map{|c| "\t#{c}"}.join(",\n") %>
<% end %>

	]},
 %% SASL config
 {sasl, [
	{sasl_error_logger, {file, "log/sasl-error.log"}},
	{errlog_type, error},
	{error_logger_mf_dir, "log/sasl"},      % Log directory
	{error_logger_mf_maxbytes, 10485760},   % 10 MB max file size
	{error_logger_mf_maxfiles, 5}           % 5 files max
	]}<% if @storage_backend.eql?("innostore") %>,
 %% Innostore config
 {innostore, [
<%= @config[:storage_backend_options].map{|c| "\t#{c}"}.join(",\n") %>
	]}<% end %><% if @limit_port_range %>,
 %% Kernel config
 { kernel, [
<%= @config[:kernel].map{|c| "\t#{c}"}.join(",\n") %>
	]}<% end %>
].
[
 %% Riak Core config
 {riak_core, [
<%= @config[:core].map{|c| "\t#{c}"}.join(",\n") %>
	]},
 %% Riak KV config
 {riak_kv, [
<% unless @storage_backend.eql?("innostore") %>
<%= @config[:storage_backend_options].map{|c| "\t#{c}"}.join(",\n") %>,
<% end %>
<%= @config[:kv].map{|c| "\t#{c}"}.join(",\n") %>
	]},
 %% SASL config
 {sasl, [
<%= @config[:sasl].map{|c| "\t#{c}"}.join(",\n") %>
	]}<% if @storage_backend.eql?("innostore") %>,
 %% Innostore config
 {innostore, [
<%= @config[:storage_backend_options].map{|c| "\t#{c}"}.join(",\n") %>
	]}<% end %><% if @limit_port_range %>,
 %% Kernel config
 { kernel, [
<%= @config[:kernel].map{|c| "\t#{c}"}.join(",\n") %>
	]}<% end %>
].
Rearrange and add SASL opts
Rearrange and add SASL opts
