From cacfa3d3ff8197323586445b64e49257a92d9936 Mon Sep 17 00:00:00 2001 From: Garret Smith Date: Tue, 4 Aug 2015 10:50:05 -0700 Subject: '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 --- priv/templates/extended_bin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3