basho/node_package — pull request #149 by jaredmorrow (2014-07-11 22:11:06+00:00)
Title: Source default config files in env.sh

Fixes: https://github.com/basho/riak/issues/563

Tested on Ubuntu 14.04 and tested a devrel to ensure it doesn't affect it.

## Test Run

```
(Reading database ... 60884 files and directories currently installed.)
Preparing to unpack riak-ee_2.0.0beta7-369ad9b8-1_amd64.deb ...
Unpacking riak-ee (2.0.0beta7-369ad9b8-1) ...
Setting up riak-ee (2.0.0beta7-369ad9b8-1) ...
Adding group `riak' (GID 113) ...
Done.
Adding system user `riak' (UID 108) ...
Adding new user `riak' (UID 108) with group `riak' ...
Not creating home directory `/var/lib/riak'.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.7.1-1) ...
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ riak ping
You need to be root or use sudo to run this command
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak ping
Node 'riak@127.0.0.1' not responding to pings.
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak start
!!!!
!!!! WARNING: ulimit -n is 1024; 65536 is the recommended minimum.
!!!!
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak ping
pong
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ cat /etc/default/riak
cat: /etc/default/riak: No such file or directory
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak stop
ok
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo vi /etc/default/riak
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ cat /etc/default/riak
export WAIT_FOR_ERLANG=1
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak ping
Node 'riak@127.0.0.1' not responding to pings.
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ sudo riak start
!!!!
!!!! WARNING: ulimit -n is 1024; 65536 is the recommended minimum.
!!!!
riak failed to start within 1 seconds,
see the output of 'riak console' for more information.
If you want to wait longer, set the environment variable
WAIT_FOR_ERLANG to the number of seconds to wait.
```