From bd29c6b0a0b1b9d248eb9c96bf065cfbdca3b241 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 30 May 2017 10:57:22 +0200 Subject: /proc/sys/kernel/random/poolsize is in bits not bytes. --- src/fripost-partman-udeb/base.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh index 0155569..f58d457 100644 --- a/src/fripost-partman-udeb/base.sh +++ b/src/fripost-partman-udeb/base.sh @@ -61,14 +61,15 @@ wait_for_device() { # installer does that already.) seed_urandom() { local seed=/var/run/random-seed fifo n records dir - local poolfile=/proc/sys/kernel/random/poolsize bytes=512 + local poolfile=/proc/sys/kernel/random/poolsize bits=4096 if [ -f "$seed" ]; then log "/dev/urandom has already been seeded since start-up" return 0 fi - [ -r $poolfile ] && bytes=$(cat $poolfile) + [ -r $poolfile ] && bits=$(cat $poolfile) + local bytes=$(( $bits / 8 )) log "Seeding /dev/urandom with $bytes bytes from /dev/random" db_subst fripost/seed_urandom_progress_title BYTES $bytes db_progress START 0 $bytes fripost/seed_urandom_progress_title -- cgit v1.2.3