diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2017-05-30 10:57:22 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2017-05-30 10:57:22 +0200 |
commit | bd29c6b0a0b1b9d248eb9c96bf065cfbdca3b241 (patch) | |
tree | 222a22fc4bd5cc7de2f8dc83a94f82234cc26468 /src | |
parent | 338b72256a3637076ce2741c69b2d8bdb9bb0754 (diff) |
/proc/sys/kernel/random/poolsize is in bits not bytes.
Diffstat (limited to 'src')
-rw-r--r-- | src/fripost-partman-udeb/base.sh | 5 |
1 files changed, 3 insertions, 2 deletions
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 |