…settings In devrel and source builds, `platform_lib_dir` gets set to the `lib` directory that is created by reltool. In all packages though, this directory is copied along with the `releases` and `erts-*` directories into the system lib directory. So in all packages `platform_lib_dir` gets defined as a top level directory containing `lib`, `releases`, and `erts-*`. The `riak` script attempts to set the load paths based on this `platform_lib_dir` setting so source builds act differently than package builds. This change fixes that inconsistency and defines a new variable `platform_base_dir` as the new system lib directory. `platform_lib_dir` is then defined as `platform_base_dir/lib` to match up with devrel/source builds. See: basho/riak#126
In some cases config files in `etc/riak` and `lib/riak` were still not given the proper permissions on install. This sets the ownership outside of the +CONTENTS file in the pre & post install scripts. This addresses bug basho/riak#200 Also, a change to not overwrite existing config files (`app.config` and `vm.args`) has been added on to the pre-install script.
When a release was generated with r14 the folsom app was started at boot time despite being an included app of riak_core. Setting the app_type() to `load` in the reltool.config fixes this. Tested on r14 and r15.
Riak is started and stopped on SmartOS using the [SMF system](http://wiki.joyent.com/display/smart/About+the+Service+Management+Facility). This system keeps track of every process started by a service. This was causing difficulties with [epmd](http://www.erlang.org/doc/man/epmd.html) because that process would not shut down on `svcadm disable riak` causing Riak to go into a "maintenance" mode. This pull request creates a separate SMF service for epmd called "riak-epmd". This will do its best to start and stop epmd in a sane manner, allowing for Riak to be started and stopped also in sane way. If an epmd process is active, but with no registered names, it is killed and restarted. See: basho/riak_ee#/75