erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
697 stars 232 forks source link

Using -args_file in vm.args seems to be broken #495

Closed larshesel closed 8 years ago

larshesel commented 8 years ago

Hi, I have a legacy application where I need to have the vm.args file in the etc directory. I wanted to do this by adding -args_file "etc/vm.args" to the vm.args in the releases/<version> folder.

Unfortunately when I start the generated relaease, the directive seems to be ignored completely ignored or the "etc/vm.args" file is not found.

However, if I put in an absolute path like -args_file "/path/to/etc/vm.args" it works if I start it erlang directly with erl -args_file vm.args, but still not when starting the console. So the functionality is working with plain erlang, but not in the generated release.

Any clues as to why this doesn't work?

larshesel commented 8 years ago

So, what I failed to mention is that when 'it doesn't work' I get the error vm.args needs to have either -name or -sname parameter. which just now led me to what I believe the problem is: https://github.com/erlware/relx/blob/master/priv/templates/extended_bin#L152-L156.

So the extended boot script doesn't look in vm.args files specified by the -args_file directive.

tsloughter commented 8 years ago

You should simply set VMARGS_PATH to etc/vm.args

larshesel commented 8 years ago

ok - I was migrating some reltool based projects and had hoped I could use the -args_file feature so I could do a drop-in replacement. I do think setting the VMARGS_PATH is a viable solution so I'll close this.

Thanks!