diff options
author | Garret Smith <[email protected]> | 2015-08-04 10:50:05 -0700 |
---|---|---|
committer | Garret Smith <[email protected]> | 2015-08-04 10:50:05 -0700 |
commit | cacfa3d3ff8197323586445b64e49257a92d9936 (patch) | |
tree | d83a10b3e16682f1ced90d76ae7f144ee5bfd86e /priv | |
parent | c67a6b7b4265b9c28fcbc785125c7538ed9b2b8d (diff) | |
download | relx-cacfa3d3ff8197323586445b64e49257a92d9936.tar.gz relx-cacfa3d3ff8197323586445b64e49257a92d9936.tar.bz2 relx-cacfa3d3ff8197323586445b64e49257a92d9936.zip |
'od' only needs to read 4 bytes of random data
'-N 4' option looks portable across all major flavors of *BSD, Linux, OSX
Adding this option prevents a strange case where 'od' can go to
100% CPU in restart scenarios
Diffstat (limited to 'priv')
-rwxr-xr-x | priv/templates/extended_bin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index f584e51..5cd8035 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -60,7 +60,7 @@ relx_rem_sh() { # Generate a random id relx_gen_id() { - od -X /dev/urandom | head -n1 | awk '{print $2}' + od -X -N 4 /dev/urandom | head -n1 | awk '{print $2}' } # Control a node |