Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion priv/templates/extended_bin
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,14 @@ erl_eval() {

# Generate a random id
relx_gen_id() {
dd count=1 bs=4 if=/dev/urandom 2> /dev/null | od -x | head -n1 | awk '{print $2$3}'
# To prevent exhaustion of atoms on target node, optionally avoid
# generation of random node prefixes, if it is guaranteed calls
# are entirely sequential.
if [ -z "${NODETOOL_NODE_PREFIX}" ]; then
dd count=1 bs=4 if=/dev/urandom 2> /dev/null | od -x | head -n1 | awk '{print $2$3}'
else
echo "${NODETOOL_NODE_PREFIX}"
fi
}

# Control a node with nodetool if erl_call isn't from OTP-23+
Expand Down