From 01fe9a5d35c4b7a9df576e7f70a9093e5861e1c5 Mon Sep 17 00:00:00 2001 From: mildis Date: Fri, 15 Jan 2021 10:03:31 +0100 Subject: [PATCH] Fix post_install.sh stuck for minutes # cat /etc/version TrueNAS-12.0-U1 (401ffb1d98) # cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1 tr: Illegal byte sequence Suggesting another key generation using openssl rand --- post_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post_install.sh b/post_install.sh index ce24081..75c06bb 100755 --- a/post_install.sh +++ b/post_install.sh @@ -2,8 +2,8 @@ # Create some random keys export LC_ALL=C -cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1 > /root/akey -cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1 > /root/skey +openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | cut -c -16 > /root/akey +openssl rand -base64 64 | tr -dc 'a-zA-Z0-9' | cut -c -16 > /root/skey AKEY=$(cat /root/akey) SKEY=$(cat /root/skey)