diff --git a/CHANGELOG.md b/CHANGELOG.md index 029fa3692..fe13d2097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ project adheres to [Semantic Versioning][SemVer]. ### Fixed - Avoid permission issues in the case where `eturnalctl` was invoked by root from a directory the user running eturnal isn't permitted to change into. +- Make sure `eturnalctl daemon` won't hang on the very first startup when using + Erlang/OTP 23 or newer. ## [1.9.1] - 2022-07-17 ### Added diff --git a/scripts/hooks/pre_start b/scripts/hooks/pre_start index 2271fed07..82bfcf9b2 100644 --- a/scripts/hooks/pre_start +++ b/scripts/hooks/pre_start @@ -2,3 +2,14 @@ if ! [ -e "$ETURNAL_ETC_PREFIX/etc/eturnal.yml" ] then export ETURNAL_ETC_PREFIX="$RELEASE_ROOT_DIR" fi + +# Until https://github.com/erlware/relx/issues/905 is fixed: +if [ -z "$COOKIE" ] +then + "$ERTS_DIR/bin/erl" \ + -noinput \ + -boot 'no_dot_erlang' \ + -sname 'cookie' \ + -eval 'halt()' \ + 2>'/dev/null' || : +fi