From 42a4d40bd4732a9508ca14a76a3d65b37c95ea37 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Wed, 22 Feb 2017 16:05:03 +0100 Subject: [PATCH] =?UTF-8?q?cat=20random=20est=20une=20mauvaise=20id=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 5f0e42d..b3fd84a 100644 --- a/scripts/install +++ b/scripts/install @@ -83,12 +83,12 @@ sudo sed -i "s@__DB_SHA__@$db_sha@g" ../conf/sql/spip.sql for i in 1 2 3 4 5 6 7 8 do - j=$(cat /dev/urandom | tr -dc '0-9' | fold -w 32 | head -n 1) + j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') if [ "$j" = "" ]; then # For obscure reasons, the loop is too fast at execution sleep 1 - j=$(cat /dev/urandom | tr -dc '0-9' | fold -w 32 | head -n 1) + j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') fi sudo sed -i "s/__ALEA_ACTUEL__/$j/g" ../conf/sql/spip.sql sudo sed -i "s/__ALEA_FUTUR__/$j/g" ../conf/sql/spip.sql